Improve CI integration for merge requests

This commit is contained in:
Dmitriy Zaporozhets 2012-12-11 06:14:05 +03:00
parent c92726e6c8
commit ca936d2784
10 changed files with 83 additions and 12 deletions

View file

@ -36,4 +36,22 @@ class GitlabCiService < Service
def commit_badge_path sha
project_url + "/status?sha=#{sha}"
end
def commit_status_path sha
project_url + "/builds/#{sha}/status.json?token=#{token}"
end
def commit_status sha
response = HTTParty.get(commit_status_path(sha))
if response.code == 200 and response["status"]
response["status"]
else
:error
end
end
def build_page sha
project_url + "/builds/#{sha}"
end
end