Class: SemVerComponents::GitHostings::Bitbucket
- Inherits:
-
SemVerComponents::GitHosting
- Object
- SemVerComponents::GitHosting
- SemVerComponents::GitHostings::Bitbucket
- Defined in:
- lib/sem_ver_components/git_hostings/bitbucket.rb
Overview
Plugin providing URLs to a Bitbucket hosting
Instance Method Summary collapse
-
#commit_url(git_url, commit_sha) ⇒ String
Get the URL to a given commit sha.
-
#compare_url(git_url, tag1, tag2) ⇒ String
Get the URL to compare 2 tags.
Instance Method Details
#commit_url(git_url, commit_sha) ⇒ String
Get the URL to a given commit sha
11 12 13 |
# File 'lib/sem_ver_components/git_hostings/bitbucket.rb', line 11 def commit_url(git_url, commit_sha) "#{public_url(git_url)}/commits/#{commit_sha}" end |
#compare_url(git_url, tag1, tag2) ⇒ String
Get the URL to compare 2 tags
21 22 23 |
# File 'lib/sem_ver_components/git_hostings/bitbucket.rb', line 21 def compare_url(git_url, tag1, tag2) "#{public_url(git_url)}/compare/commits?targetBranch=refs%2Ftags%2F#{tag1}&sourceBranch=refs%2Ftags%2F#{tag2}" end |