Commit 559bb7c3 authored by Nathan Friend's avatar Nathan Friend

Remove `fancy_pipeline_slack_notifications` flag

This commit removes the `fancy_pipeline_slack_notifications` feature
flag and associated code paths and tests.
parent 5a1e492b
......@@ -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}"
......
......@@ -3633,9 +3633,6 @@ msgstr ""
msgid "ChatMessage|and [%{count} more](%{pipeline_failed_jobs_url})"
msgstr ""
msgid "ChatMessage|failed"
msgstr ""
msgid "ChatMessage|has failed"
msgstr ""
......@@ -3651,9 +3648,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