summaryrefslogtreecommitdiff
path: root/app/helpers/ci_status_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/helpers/ci_status_helper.rb')
-rw-r--r--app/helpers/ci_status_helper.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/app/helpers/ci_status_helper.rb b/app/helpers/ci_status_helper.rb
index a7cdca9ba2e..2de9e0de310 100644
--- a/app/helpers/ci_status_helper.rb
+++ b/app/helpers/ci_status_helper.rb
@@ -59,6 +59,24 @@ module CiStatusHelper
custom_icon(icon_name)
end
+ def pipeline_status_cache_key(pipeline_status)
+ "pipeline-status/#{pipeline_status.sha}-#{pipeline_status.status}"
+ end
+
+ def render_project_pipeline_status(pipeline_status, tooltip_placement: 'auto left')
+ project = pipeline_status.project
+ path = pipelines_namespace_project_commit_path(
+ project.namespace,
+ project,
+ pipeline_status.sha)
+
+ render_status_with_link(
+ 'commit',
+ pipeline_status.status,
+ path,
+ tooltip_placement: tooltip_placement)
+ end
+
def render_commit_status(commit, ref: nil, tooltip_placement: 'auto left')
project = commit.project
path = pipelines_namespace_project_commit_path(