Class: Vpr::Services::GitLab

Inherits:
Object
  • Object
show all
Defined in:
lib/vpr/services/gitlab.rb

Class Method Summary collapse

Class Method Details

.branch_urlObject



22
23
24
# File 'lib/vpr/services/gitlab.rb', line 22

def self.branch_url
  "#{GitParser.repo_url}/-/tree/#{GitParser.current_branch}"
end

.branches_urlObject



18
19
20
# File 'lib/vpr/services/gitlab.rb', line 18

def self.branches_url
  "#{GitParser.repo_url}/-/branches"
end

.commit_url(commit) ⇒ Object



31
32
33
# File 'lib/vpr/services/gitlab.rb', line 31

def self.commit_url(commit)
  "#{GitParser.repo_url}/-/commit/#{commit}"
end

.home_urlObject



6
7
8
# File 'lib/vpr/services/gitlab.rb', line 6

def self.home_url
  GitParser.repo_url
end

.issues_urlObject



14
15
16
# File 'lib/vpr/services/gitlab.rb', line 14

def self.issues_url
  "#{GitParser.repo_url}/-/issues"
end

.pull_url(branch = nil) ⇒ Object



26
27
28
29
# File 'lib/vpr/services/gitlab.rb', line 26

def self.pull_url(branch = nil)
  branch ||= GitParser.current_branch
  "#{GitParser.repo_url}/-/merge_requests/#{branch}"
end

.pulls_urlObject



10
11
12
# File 'lib/vpr/services/gitlab.rb', line 10

def self.pulls_url
  "#{GitParser.repo_url}/-/merge_requests"
end

.search_url(commit) ⇒ Object



35
36
37
# File 'lib/vpr/services/gitlab.rb', line 35

def self.search_url(commit)
  "#{GitParser.host}/search?search=#{commit}"
end