diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2016-11-24 12:00:37 +0300 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2016-11-24 13:41:45 +0300 |
commit | 101cde38cf6d5506ea37c5f912fb4c37af50c541 (patch) | |
tree | b2af01436928dd612b2115dcda5cd2e12c372a0a /lib/gitlab/badge | |
parent | 6192ea53fad0ea04e356e5a79a5a0e5359ba46ce (diff) |
Use Ci::Pipeline#latest for finding pipelines
Feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7333#note_18861407
Diffstat (limited to 'lib/gitlab/badge')
-rw-r--r-- | lib/gitlab/badge/build/status.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/gitlab/badge/build/status.rb b/lib/gitlab/badge/build/status.rb index 50aa45e5406..f78dfd5b83a 100644 --- a/lib/gitlab/badge/build/status.rb +++ b/lib/gitlab/badge/build/status.rb @@ -20,7 +20,8 @@ module Gitlab def status @project.pipelines - .where(sha: @sha, ref: @ref) + .where(sha: @sha) + .latest(@ref) .status || 'unknown' end |