Fix Broken link formatting in Gitlab for Slack app
What does this MR do and why?
Per #31263 (closed), we're experiencing broken formatting in the GitLab for Slack app
for deployment messages.
This MR is fixing the ~bug by formatting description message in the attachments
.
Screenshots or screen recordings
Before | After |
---|---|
![]() |
![]() |
How to set up and validate locally
- Checkout the branch
- Configure the
GitLab for Slack App
integration - Prepare a deployment message
- Create a testing channel in the testing Slack app
- Notify the channel with the deployment message.
# prepare a deployment message
deployment = DeploymentsFinder.new(project: Project.find('ABC'), order_by: 'created_at', sort: 'desc').execute.first
deployment_events_data = Gitlab::DataBuilder::Deployment.build(deployment, deployment.status, Time.current)
deployment_message = Integrations::ChatMessage::DeploymentMessage.new(deployment_events_data)
gitlab_slack_app = Integrations::GitlabSlackApplication.find('XYZ')
gitlab_slack_app.send(:notify, deployment_message, { channel: '#bojan-testing' })
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #31263 (closed)
Edited by Bojan Marjanovic