From f7a7a753a4217fb38f74b1761d077e490d615dae Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Wed, 25 Jul 2018 21:45:13 -0700 Subject: Add comment about why using `first` --- lib/bitbucket_server/representation/repo.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/bitbucket_server') 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 -- cgit v1.2.3