diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2016-10-26 19:48:32 +0300 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2016-10-26 19:58:40 +0300 |
commit | b4ef158a63807c850c1a17c75d66cd166c309047 (patch) | |
tree | 2de3bf0a9e3d7e84a7922cfceea20ccee86343fe /app/helpers/ci_status_helper.rb | |
parent | 7cdb238ac507b85a606e0e64c71373c2fc37254c (diff) |
Still show status from pipelines, see:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7034#note_17397201
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7034#note_17397461
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6801#note_17468470
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7034#note_17482654
Diffstat (limited to 'app/helpers/ci_status_helper.rb')
-rw-r--r-- | app/helpers/ci_status_helper.rb | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/app/helpers/ci_status_helper.rb b/app/helpers/ci_status_helper.rb index 7d1b41b8fbe..7851949ccf0 100644 --- a/app/helpers/ci_status_helper.rb +++ b/app/helpers/ci_status_helper.rb @@ -54,15 +54,18 @@ module CiStatusHelper custom_icon(icon_name) end - def render_commit_ref_status(commit, ref = nil, **args) - pipeline = commit.pipelines_for(ref).last - render_pipeline_status(pipeline, **args) - end - - def render_commit_status(commit, tooltip_placement: 'auto left') + def render_commit_status(commit, ref: nil, tooltip_placement: 'auto left') project = commit.project - path = pipelines_namespace_project_commit_path(project.namespace, project, commit) - render_status_with_link('commit', commit.status, path, tooltip_placement: tooltip_placement) + path = pipelines_namespace_project_commit_path( + project.namespace, + project, + commit) + + render_status_with_link( + 'commit', + commit.status_for(ref), + path, + tooltip_placement: tooltip_placement) end def render_pipeline_status(pipeline, tooltip_placement: 'auto left') |