diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-12-06 21:14:09 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-12-06 21:14:09 +0300 |
commit | a15c9bc9eb04dcee1369c5fd6248c6352915ad21 (patch) | |
tree | 3f40f6f76615d85a7bfa45d5b1045d2fbe22860f /app/presenters/ci/pipeline_presenter.rb | |
parent | 55242833f832095a6fcff00b1ccacbc5900ee52a (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/presenters/ci/pipeline_presenter.rb')
-rw-r--r-- | app/presenters/ci/pipeline_presenter.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/app/presenters/ci/pipeline_presenter.rb b/app/presenters/ci/pipeline_presenter.rb index e0cb899c9d3..00820e00863 100644 --- a/app/presenters/ci/pipeline_presenter.rb +++ b/app/presenters/ci/pipeline_presenter.rb @@ -62,6 +62,13 @@ module Ci localized_names.fetch(pipeline.merge_request_event_type, s_('Pipeline|Pipeline')) end + delegator_override :coverage + def coverage + return unless pipeline.coverage.present? + + '%.2f' % pipeline.coverage + end + def ref_text if pipeline.detached_merge_request_pipeline? _("for %{link_to_merge_request} with %{link_to_merge_request_source_branch}") |