Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-08-18 12:37:07 +0300
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-08-18 17:30:43 +0300
commit42496ecef778ad6d3500babbf33d350b6ab984d7 (patch)
tree013ac8ce320ca92a86444d9603e56a56c0ba1158 /lib/gitlab/badge
parentac73de508e21af95b473bfafc2ca2543b234430d (diff)
Render coverage badge for latest successful pipeline
Diffstat (limited to 'lib/gitlab/badge')
-rw-r--r--lib/gitlab/badge/coverage/report.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/gitlab/badge/coverage/report.rb b/lib/gitlab/badge/coverage/report.rb
index 3d56ea3e47a..95d925dc7f3 100644
--- a/lib/gitlab/badge/coverage/report.rb
+++ b/lib/gitlab/badge/coverage/report.rb
@@ -13,8 +13,7 @@ module Gitlab
@job = job
@pipeline = @project.pipelines
- .where(ref: @ref)
- .where(sha: @project.commit(@ref).try(:sha))
+ .latest_successful_for(@ref)
.first
end