-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(slack): Use blocks for releasing to Slack
This feature should make the Slack output much nicer and will be iterated upon to add more detail.
- Loading branch information
Showing
7 changed files
with
52 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package slack | ||
|
||
type content struct { | ||
// expected type is "mrkdwn" | ||
Type string `json:"type"` | ||
// markdown compliant message | ||
Text string `json:"text"` | ||
} | ||
|
||
// Block holds the different blocks uses in the Slack block API, due to some unfortunate naming json:"text" actually contains subsections. | ||
type Block struct { | ||
// expected type is "section" | ||
Type string `json:"type"` | ||
Section content `json:"text"` | ||
} | ||
|
||
// WebhookMessage is the specific structure that Slack uses for the Webhook API | ||
type WebhookMessage struct { | ||
Blocks []Block `json:"blocks"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"blocks":[{"type":"section","text":{"type":"mrkdwn","text":"*Features*\r\nci test\r\n"}},{"type":"section","text":{"type":"mrkdwn","text":"*Bug fixes*\r\nhuge bug\r\nbug fix\r\n"}},{"type":"section","text":{"type":"mrkdwn","text":"*Chores and Improvements*\r\ntesting\r\nthis should end up in chores\r\n"}},{"type":"section","text":{"type":"mrkdwn","text":"*Other*\r\nmerge master in something\r\nrandom\r\n"}}]} |