Commit b486ee40 authored by Shinya Maeda's avatar Shinya Maeda

Merge branch 'nfriend-remove-fancy_pipeline_slack_notifications-ff' into 'master'

Remove `fancy_pipeline_slack_notifications` feature flag

See merge request gitlab-org/gitlab!29969
parents 3233d6f9 559bb7c3
......@@ -52,8 +52,6 @@ module ChatMessage
def attachments
return message if markdown
return [{ text: format(message), color: attachment_color }] unless fancy_notifications?
[{
fallback: format(message),
color: attachment_color,
......@@ -103,10 +101,6 @@ module ChatMessage
failed_jobs.uniq { |job| job[:name] }.reverse
end
def fancy_notifications?
Feature.enabled?(:fancy_pipeline_slack_notifications, default_enabled: true)
end
def failed_stages_field
{
title: s_("ChatMessage|Failed stage").pluralize(failed_stages.length),
......@@ -166,42 +160,22 @@ module ChatMessage
end
def humanized_status
if fancy_notifications?
case status
when 'success'
detailed_status == "passed with warnings" ? s_("ChatMessage|has passed with warnings") : s_("ChatMessage|has passed")
when 'failed'
s_("ChatMessage|has failed")
else
status
end
case status
when 'success'
detailed_status == "passed with warnings" ? s_("ChatMessage|has passed with warnings") : s_("ChatMessage|has passed")
when 'failed'
s_("ChatMessage|has failed")
else
case status
when 'success'
s_("ChatMessage|passed")
when 'failed'
s_("ChatMessage|failed")
else
status
end
status
end
end
def attachment_color
if fancy_notifications?
case status
when 'success'
detailed_status == 'passed with warnings' ? 'warning' : 'good'
else
'danger'
end
case status
when 'success'
detailed_status == 'passed with warnings' ? 'warning' : 'good'
else
case status
when 'success'
'good'
else
'danger'
end
'danger'
end
end
......@@ -230,7 +204,7 @@ module ChatMessage
end
def pipeline_url
if fancy_notifications? && failed_jobs.any?
if failed_jobs.any?
pipeline_failed_jobs_url
else
"#{project_url}/pipelines/#{pipeline_id}"
......
......@@ -3639,9 +3639,6 @@ msgstr ""
msgid "ChatMessage|and [%{count} more](%{pipeline_failed_jobs_url})"
msgstr ""
msgid "ChatMessage|failed"
msgstr ""
msgid "ChatMessage|has failed"
msgstr ""
......@@ -3657,9 +3654,6 @@ msgstr ""
msgid "ChatMessage|in %{project_link}"
msgstr ""
msgid "ChatMessage|passed"
msgstr ""
msgid "Check again"
msgstr ""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment