summaryrefslogtreecommitdiff
path: root/lib/bitbucket_server
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2018-07-01 05:55:23 -0700
committerStan Hu <stanhu@gmail.com>2018-07-01 05:55:23 -0700
commit8377057364f70108c4cc77f1a3ead33779c83cec (patch)
tree661c7e6e94939ba6c8918f92d77508b538efc824 /lib/bitbucket_server
parent3735ce43fc5adfb82fb22730978ba0bca696c37d (diff)
downloadgitlab-ce-8377057364f70108c4cc77f1a3ead33779c83cec.tar.gz
Fix URL link in Bitbucket status
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