Class: Vpr::Services::GitHub
- Inherits:
-
Object
- Object
- Vpr::Services::GitHub
- Defined in:
- lib/vpr/services/github.rb
Class Method Summary collapse
- .branch_url ⇒ Object
- .branches_url ⇒ Object
- .commit_url(commit) ⇒ Object
- .home_url ⇒ Object
- .issues_url ⇒ Object
- .pull_url(branch = nil) ⇒ Object
- .pulls_url ⇒ Object
- .search_url(commit) ⇒ Object
Class Method Details
.branch_url ⇒ Object
22 23 24 |
# File 'lib/vpr/services/github.rb', line 22 def self.branch_url "#{GitParser.repo_url}/tree/#{GitParser.current_branch}" end |
.branches_url ⇒ Object
18 19 20 |
# File 'lib/vpr/services/github.rb', line 18 def self.branches_url "#{GitParser.repo_url}/branches" end |
.commit_url(commit) ⇒ Object
35 36 37 |
# File 'lib/vpr/services/github.rb', line 35 def self.commit_url(commit) "#{GitParser.repo_url}/commit/#{commit}" end |
.home_url ⇒ Object
6 7 8 |
# File 'lib/vpr/services/github.rb', line 6 def self.home_url GitParser.repo_url end |
.issues_url ⇒ Object
14 15 16 |
# File 'lib/vpr/services/github.rb', line 14 def self.issues_url "#{GitParser.repo_url}/issues" end |
.pull_url(branch = nil) ⇒ Object
26 27 28 29 30 31 32 33 |
# File 'lib/vpr/services/github.rb', line 26 def self.pull_url(branch = nil) branch ||= GitParser.current_branch base_url = "#{GitParser.repo_url}/pull" base_url.concat("/new") if branch.match?(/\d+\/.+/) "#{base_url}/#{branch}" end |