Wrong mattermost notification message markdown on pipeline fail
Summary
The message that been sent to mattermost on pipeline broken is wrong formatted and duplicated.
Steps to reproduce
- Setup integration with mattermost notification.
- Add mattermost webhook link and specify channel that will receive the message.
- Subscribe to pipeline event. Check notify on broken pipeline.
- Have a broken pipeline in the project, a notification will be sent to mattermost.
Example Project
What is the current bug behavior?
Message displayed in mattermost channel is in wrong markdown format and somehow duplicate also. It looks like this.
https://gitlab.com/enCapital/mobile/arrow-app|arrow-app: Pipeline https://gitlab.com/enCapital/mobile/arrow-app/-/pipelines/245274626/failures|#245274626 of branch https://gitlab.com/enCapital/mobile/arrow-app/-/commits/ENTRADE-3861|ENTRADE-3861 by Nhat Tran Quang (harrytran998) has failed in 02:26
https://gitlab.com/enCapital/mobile/arrow-app|arrow-app: Pipeline https://gitlab.com/enCapital/mobile/arrow-app/-/pipelines/245274626/failures|#245274626 of branch https://gitlab.com/enCapital/mobile/arrow-app/-/commits/ENTRADE-3861|ENTRADE-3861 by Nhat Tran Quang (harrytran998) has failed in 02:26
https://gitlab.com/enCapital/mobile/arrow-app|arrow-app: Pipeline https://gitlab.com/enCapital/mobile/arrow-app/-/pipelines/245274626/failures|#245274626 of branch https://gitlab.com/enCapital/mobile/arrow-app/-/commits/ENTRADE-3861|ENTRADE-3861 by Nhat Tran Quang (harrytran998) has failed in 02:26
What is the expected correct behavior?
Message should be in correct Markdown format supported by mattermost. For example.
[arrow-app](https://gitlab.com/enCapital/mobile/arrow-app): Pipeline [#245274626](https://gitlab.com/enCapital/mobile/arrow-app/-/pipelines/245274626/failures) of branch [ENTRADE-3861](https://gitlab.com/enCapital/mobile/arrow-app/-/commits/ENTRADE-3861) by Nhat Tran Quang (harrytran998) has failed in 02:26
Output of checks
This bug happens on GitLab.com
Possible fixes
It seems like the message has been generated follow Slack link markdown, which is something like <http://www.foo.com|This message a link>. Ref https://api.slack.com/reference/surfaces/formatting#linking-urls
So I think it should use standard markdown instead.