Class: Terraspace::Cloud::Vcs::LocalGit::Bitbucket
- Defined in:
- lib/terraspace/cloud/vcs/local_git/bitbucket.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
- #branch_url ⇒ Object
- #commit_url ⇒ Object
-
#pr_url ⇒ Object
Also computed in ci plugins which detects it from the ci env.
Methods inherited from Base
#initialize, #pr_number, #vars, vars_method, vars_methods
Constructor Details
This class inherits a constructor from Terraspace::Cloud::Vcs::LocalGit::Base
Instance Method Details
#branch_url ⇒ Object
7 8 9 |
# File 'lib/terraspace/cloud/vcs/local_git/bitbucket.rb', line 7 def branch_url "#{host}/#{full_repo}/branch/#{branch_name}" if branch_name end |
#commit_url ⇒ Object
3 4 5 |
# File 'lib/terraspace/cloud/vcs/local_git/bitbucket.rb', line 3 def commit_url "#{host}/#{full_repo}/commits/#{sha}" if sha end |
#pr_url ⇒ Object
Also computed in ci plugins which detects it from the ci env. Also handling here for case when user provides PR_NUMBER and GIT_REPO outside of normal CI env.
13 14 15 |
# File 'lib/terraspace/cloud/vcs/local_git/bitbucket.rb', line 13 def pr_url "#{host}/#{full_repo}/pull-requests/#{pr_number}" if pr_number end |