summaryrefslogtreecommitdiff
path: root/app/helpers/ci
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-08-12 15:10:02 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-08-12 15:10:02 +0000
commitf6a3028be7c20cd509685258ba7e50d9d6a68114 (patch)
tree82960188ccaca3f08a3b3e45b33010ad523230cc /app/helpers/ci
parent999f47e9e6da399de9dc1de404f073f7dd30af0d (diff)
downloadgitlab-ce-f6a3028be7c20cd509685258ba7e50d9d6a68114.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/helpers/ci')
-rw-r--r--app/helpers/ci/pipelines_helper.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/app/helpers/ci/pipelines_helper.rb b/app/helpers/ci/pipelines_helper.rb
new file mode 100644
index 00000000000..749726e0e33
--- /dev/null
+++ b/app/helpers/ci/pipelines_helper.rb
@@ -0,0 +1,18 @@
+# frozen_string_literal: true
+
+module Ci
+ module PipelinesHelper
+ def pipeline_warnings(pipeline)
+ return unless pipeline.warning_messages.any?
+
+ content_tag(:div, class: 'alert alert-warning') do
+ content_tag(:h4, 'Warning:') <<
+ content_tag(:div) do
+ pipeline.warning_messages.each do |warning|
+ concat(markdown(warning.content))
+ end
+ end
+ end
+ end
+ end
+end