diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-08-18 12:37:07 +0300 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-08-18 17:30:43 +0300 |
commit | 42496ecef778ad6d3500babbf33d350b6ab984d7 (patch) | |
tree | 013ac8ce320ca92a86444d9603e56a56c0ba1158 /lib/gitlab | |
parent | ac73de508e21af95b473bfafc2ca2543b234430d (diff) |
Render coverage badge for latest successful pipeline
Diffstat (limited to 'lib/gitlab')
-rw-r--r-- | lib/gitlab/badge/coverage/report.rb | 3 |
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 |