自定义 GitLab 松弛集成消息
Customize GitLab slack integration messages
是否可以更改 "Receive event notifications in Slack" 上的自动松弛通知?
例如,如果管道已成功完成,我们会从 Webhook 收到以下消息:
User/Project Name: Pipeline #269 of tag Ticket_8088 by User-Name
(User) passed in 12:02
消息的形式应该不同。
我是服务器管理员。所以我也可以在代码层面改变一些东西。 (如果需要)
没有编程的方式来完成这样的任务。
所有消息都硬编码在 app/models/project_services/chat_message
中(如您所见 in the repo)。
因此,在您的情况下,您需要在 app/models/project_services/chat_message/pipeline_message.rb
中更改方法 activity
- 请注意,当您更新 GitLab 时,您的更改将被丢弃。
是否可以更改 "Receive event notifications in Slack" 上的自动松弛通知?
例如,如果管道已成功完成,我们会从 Webhook 收到以下消息:
User/Project Name: Pipeline #269 of tag Ticket_8088 by User-Name (User) passed in 12:02
消息的形式应该不同。
我是服务器管理员。所以我也可以在代码层面改变一些东西。 (如果需要)
没有编程的方式来完成这样的任务。
所有消息都硬编码在 app/models/project_services/chat_message
中(如您所见 in the repo)。
因此,在您的情况下,您需要在 app/models/project_services/chat_message/pipeline_message.rb
中更改方法 activity
- 请注意,当您更新 GitLab 时,您的更改将被丢弃。