Commit 637bbc17 authored by Ivar Derksen's avatar Ivar Derksen
Browse files

Fix: duplicate message bug in pushToSlack

parent 8179f519
......@@ -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