diff options
author | Stan Hu <stanhu@gmail.com> | 2018-07-26 07:45:13 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2018-07-26 07:45:13 +0300 |
commit | f7a7a753a4217fb38f74b1761d077e490d615dae (patch) | |
tree | d7f4f5c342a3991fb5d42b0afa4bbf8c887a0fe1 /lib/bitbucket_server/representation/repo.rb | |
parent | 930b5e7a5b6a6cdbedae327c3bb2fa1e260744b3 (diff) |
Add comment about why using `first`
Diffstat (limited to 'lib/bitbucket_server/representation/repo.rb')
-rw-r--r-- | lib/bitbucket_server/representation/repo.rb | 2 |
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 |