Add status badge for MR
This commit is contained in:
parent
ed92cfdebd
commit
ebcbe0c87b
5 changed files with 20 additions and 0 deletions
|
@ -32,4 +32,8 @@ class GitlabCiService < Service
|
|||
hook.url = [project_url, "/build", "?token=#{token}"].join("")
|
||||
hook.save
|
||||
end
|
||||
|
||||
def commit_badge_path sha
|
||||
project_url + "/status?sha=#{sha}"
|
||||
end
|
||||
end
|
||||
|
|
|
@ -188,4 +188,8 @@ class Project < ActiveRecord::Base
|
|||
def services
|
||||
[gitlab_ci_service].compact
|
||||
end
|
||||
|
||||
def gitlab_ci?
|
||||
gitlab_ci_service && gitlab_ci_service.active
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue