|
|
@ -33,6 +33,7 @@ type SlackPayload struct { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
type SlackAttachment struct { |
|
|
|
type SlackAttachment struct { |
|
|
|
|
|
|
|
Fallback string `json:"fallback"` |
|
|
|
Color string `json:"color"` |
|
|
|
Color string `json:"color"` |
|
|
|
Text string `json:"text"` |
|
|
|
Text string `json:"text"` |
|
|
|
} |
|
|
|
} |
|
|
@ -111,7 +112,12 @@ func getSlackPushPayload(p *api.PushPayload, slack *SlackMeta) (*SlackPayload, e |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
slackAttachments := []SlackAttachment{{Color: slack.Color, Text: attachmentText}} |
|
|
|
slackAttachments := []SlackAttachment{{ |
|
|
|
|
|
|
|
Fallback: fmt.Sprintf("%s pushed %s to %s/%s: %s", |
|
|
|
|
|
|
|
p.Pusher, commitString, p.Repo.Name, branchName, p.CompareUrl), |
|
|
|
|
|
|
|
Color: slack.Color, |
|
|
|
|
|
|
|
Text: attachmentText, |
|
|
|
|
|
|
|
}} |
|
|
|
|
|
|
|
|
|
|
|
return &SlackPayload{ |
|
|
|
return &SlackPayload{ |
|
|
|
Channel: slack.Channel, |
|
|
|
Channel: slack.Channel, |
|
|
|