summaryrefslogtreecommitdiff
path: root/lib/bitbucket_server
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2018-07-25 21:45:13 -0700
committerStan Hu <stanhu@gmail.com>2018-07-25 21:45:13 -0700
commitf7a7a753a4217fb38f74b1761d077e490d615dae (patch)
treed7f4f5c342a3991fb5d42b0afa4bbf8c887a0fe1 /lib/bitbucket_server
parent930b5e7a5b6a6cdbedae327c3bb2fa1e260744b3 (diff)
downloadgitlab-ce-f7a7a753a4217fb38f74b1761d077e490d615dae.tar.gz
Add comment about why using `first`
Diffstat (limited to 'lib/bitbucket_server')
-rw-r--r--lib/bitbucket_server/representation/repo.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/bitbucket_server/representation/repo.rb b/lib/bitbucket_server/representation/repo.rb
index ba90a15f11f..9c518341e66 100644
--- a/lib/bitbucket_server/representation/repo.rb
+++ b/lib/bitbucket_server/representation/repo.rb
@@ -16,6 +16,8 @@ module BitbucketServer
end
def browse_url
+ # The JSON reponse contains an array of 1 element. Not sure if there
+ # are cases where multiple links would be provided.
raw.dig('links', 'self').first.fetch('href')
end