Unverified Commit 30ccfd2a authored by Sietse Ringers's avatar Sietse Ringers Committed by GitHub
Browse files

Merge pull request #4 from privacybydesign/fix-push-to-slack

Fix: duplicate message bug in pushToSlack
parents 8179f519 637bbc17
Pipeline #59069 passed with stage
in 36 seconds
......@@ -251,6 +251,7 @@ func pushToSlack(newIssues, fixedIssues issueEntries, initial bool) {
message := "@channel New issues discovered."
var attachments []slack.Attachment
for _, msg := range dangers {
msg := msg
attachments = append(attachments, slack.Attachment{
Fallback: &msg,
Text: &msg,
......@@ -264,6 +265,7 @@ func pushToSlack(newIssues, fixedIssues issueEntries, initial bool) {
message := "New warnings discovered."
var attachments []slack.Attachment
for _, msg := range warnings {
msg := msg
attachments = append(attachments, slack.Attachment{
Fallback: &msg,
Text: &msg,
......@@ -278,6 +280,7 @@ func pushToSlack(newIssues, fixedIssues issueEntries, initial bool) {
message := "The following issues and warnings were fixed."
var attachments []slack.Attachment
for _, msg := range fixedIssues.messages() {
msg := msg
attachments = append(attachments, slack.Attachment{
Fallback: &msg,
Text: &msg,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment