summaryrefslogtreecommitdiff
path: root/lib/bitbucket_server
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bitbucket_server')
-rw-r--r--lib/bitbucket_server/representation/repo.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/bitbucket_server/representation/repo.rb b/lib/bitbucket_server/representation/repo.rb
index 2f3a60b204b..52dbe040a60 100644
--- a/lib/bitbucket_server/representation/repo.rb
+++ b/lib/bitbucket_server/representation/repo.rb
@@ -13,6 +13,10 @@ module BitbucketServer
raw['slug']
end
+ def browse_url
+ link = raw.dig('project', 'links', 'self').first.fetch('href')
+ end
+
def clone_url
raw['links']['clone'].find { |link| link['name'].starts_with?('http') }.fetch('href')
end