Alerting: Remove duplicate Slack notification title (#58107)

Move mentions to a markdown-formatted pretext field
to prevent issues mixing blocks and legacy-attachment content.
This commit is contained in:
Will Jordan
2022-11-04 09:09:24 -07:00
committed by GitHub
parent 4d2bf41efb
commit d581b368bd
3 changed files with 12 additions and 38 deletions

View File

@@ -2312,7 +2312,6 @@ var expNonEmailNotifications = map[string][]string{
"slack_recv1/slack_test_without_token": {
`{
"channel": "#test-channel",
"text": "Integration Test [FIRING:1] SlackAlert1 (default)",
"username": "Integration Test",
"icon_emoji": "🚀",
"icon_url": "https://awesomeemoji.com/rocket",
@@ -2325,16 +2324,9 @@ var expNonEmailNotifications = map[string][]string{
"footer": "Grafana v",
"footer_icon": "https://grafana.com/assets/img/fav32.png",
"color": "#D63232",
"ts": %s
}
],
"blocks": [
{
"text": {
"text": "<!here|here> <!subteam^group1><!subteam^group2> <@user1><@user2>",
"type": "mrkdwn"
},
"type": "section"
"ts": %s,
"mrkdwn_in": ["pretext"],
"pretext": "<!here|here> <!subteam^group1><!subteam^group2> <@user1><@user2>"
}
]
}`,
@@ -2342,7 +2334,6 @@ var expNonEmailNotifications = map[string][]string{
"slack_recvX/slack_testX": {
`{
"channel": "#test-channel",
"text": "[FIRING:1] SlackAlert2 (default)",
"username": "Integration Test",
"attachments": [
{
@@ -2353,16 +2344,9 @@ var expNonEmailNotifications = map[string][]string{
"footer": "Grafana v",
"footer_icon": "https://grafana.com/assets/img/fav32.png",
"color": "#D63232",
"ts": %s
}
],
"blocks": [
{
"text": {
"text": "<@user1><@user2>",
"type": "mrkdwn"
},
"type": "section"
"ts": %s,
"mrkdwn_in": ["pretext"],
"pretext": "<@user1><@user2>"
}
]
}`,