Also use latest_status, feedback:

https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7333#note_20058857
This commit is contained in:
Lin Jen-Shin 2016-12-15 18:12:33 +08:00
parent 7cced60069
commit f463ef5ec5

View file

@ -21,8 +21,7 @@ module Gitlab
def status def status
@project.pipelines @project.pipelines
.where(sha: @sha) .where(sha: @sha)
.latest(@ref) .latest_status(@ref) || 'unknown'
.status || 'unknown'
end end
def metadata def metadata