summaryrefslogtreecommitdiff
path: root/app/helpers/ci_status_helper.rb
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2016-10-21 16:22:43 +0800
committerLin Jen-Shin <godfat@godfat.org>2016-10-24 22:26:06 +0800
commit5416d0e0837f69f35a3a9deaf947fd62e5293661 (patch)
tree464b29e773327e213a035131ee0f8f2c770f0fd7 /app/helpers/ci_status_helper.rb
parent4028022f56f81f9cbe1227dae53c878f702bd8fa (diff)
downloadgitlab-ce-5416d0e0837f69f35a3a9deaf947fd62e5293661.tar.gz
Pass `@ref` along so we know which pipeline to show
Closes #23615
Diffstat (limited to 'app/helpers/ci_status_helper.rb')
-rw-r--r--app/helpers/ci_status_helper.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/helpers/ci_status_helper.rb b/app/helpers/ci_status_helper.rb
index b7f48630bd4..7d1b41b8fbe 100644
--- a/app/helpers/ci_status_helper.rb
+++ b/app/helpers/ci_status_helper.rb
@@ -54,6 +54,11 @@ 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')
project = commit.project
path = pipelines_namespace_project_commit_path(project.namespace, project, commit)