summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2016-12-15 18:12:33 +0800
committerLin Jen-Shin <godfat@godfat.org>2016-12-15 18:12:33 +0800
commitf463ef5ec58fd26ad5368f57a29d758756dafc3f (patch)
tree421929c0a485381208b7cc4df127b70b8c2c1559
parent7cced60069c248156decf6ceabc4d1f447e47ff7 (diff)
downloadgitlab-ce-f463ef5ec58fd26ad5368f57a29d758756dafc3f.tar.gz
Also use latest_status, feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7333#note_20058857
-rw-r--r--lib/gitlab/badge/build/status.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/gitlab/badge/build/status.rb b/lib/gitlab/badge/build/status.rb
index f78dfd5b83a..b762d85b6e5 100644
--- a/lib/gitlab/badge/build/status.rb
+++ b/lib/gitlab/badge/build/status.rb
@@ -21,8 +21,7 @@ module Gitlab
def status
@project.pipelines
.where(sha: @sha)
- .latest(@ref)
- .status || 'unknown'
+ .latest_status(@ref) || 'unknown'
end
def metadata