diff options
author | Stan Hu <stanhu@gmail.com> | 2018-07-01 15:55:23 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2018-07-01 15:55:23 +0300 |
commit | 8377057364f70108c4cc77f1a3ead33779c83cec (patch) | |
tree | 661c7e6e94939ba6c8918f92d77508b538efc824 /lib/bitbucket_server | |
parent | 3735ce43fc5adfb82fb22730978ba0bca696c37d (diff) |
Fix URL link in Bitbucket status
Diffstat (limited to 'lib/bitbucket_server')
-rw-r--r-- | lib/bitbucket_server/representation/repo.rb | 4 |
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 |