From e59d205bda42008c8e5745d85c7a243f68c7dca3 Mon Sep 17 00:00:00 2001 From: Andy Gardner Date: Thu, 5 Mar 2015 09:57:49 +0000 Subject: [PATCH] Adding drone icon to slack notifications --- plugin/notify/slack.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugin/notify/slack.go b/plugin/notify/slack.go index 7599ba511..2aa175be4 100644 --- a/plugin/notify/slack.go +++ b/plugin/notify/slack.go @@ -14,6 +14,7 @@ const ( slackSuccessFallbackMessage = "Success %s (%s) by %s" slackFailureMessage = "*Failed* <%s|%s> (%s) by %s" slackFailureFallbackMessage = "Failed %s (%s) by %s" + drone_icon = "https://avatars.githubusercontent.com/drone" ) type Slack struct { @@ -89,8 +90,9 @@ func (s *Slack) send(msg string, fallback string, color string) error { data := struct { Channel string `json:"channel"` Username string `json:"username"` + Icon string `json:"icon_url"` Attachments []Attachment `json:"attachments"` - }{s.Channel, s.Username, attachments} + }{s.Channel, s.Username, drone_icon, attachments} // data json encoded payload, err := json.Marshal(data)