mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-01-17 17:45:03 +02:00
Merge pull request #908 from mukuru/slack_notification_icon
Adding drone icon to slack notifications
This commit is contained in:
commit
74450d59d1
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user