Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/integrations/chat_message/deployment_message.rb')
-rw-r--r--app/models/integrations/chat_message/deployment_message.rb24
1 files changed, 12 insertions, 12 deletions
diff --git a/app/models/integrations/chat_message/deployment_message.rb b/app/models/integrations/chat_message/deployment_message.rb
index 0367459dfcb..4d3e962d885 100644
--- a/app/models/integrations/chat_message/deployment_message.rb
+++ b/app/models/integrations/chat_message/deployment_message.rb
@@ -30,7 +30,7 @@ module Integrations
[{
text: format(description_message),
- color: color
+ color: attachment_color
}]
end
@@ -38,17 +38,7 @@ module Integrations
{}
end
- private
-
- def message
- if running?
- "Starting deploy to #{strip_markup(environment)}"
- else
- "Deploy to #{strip_markup(environment)} #{humanized_status}"
- end
- end
-
- def color
+ def attachment_color
case status
when 'success'
'good'
@@ -61,6 +51,16 @@ module Integrations
end
end
+ private
+
+ def message
+ if running?
+ "Starting deploy to #{strip_markup(environment)}"
+ else
+ "Deploy to #{strip_markup(environment)} #{humanized_status}"
+ end
+ end
+
def project_link
link(project_name, project_url)
end