-
Notifications
You must be signed in to change notification settings - Fork 206
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add thread message posting (#445)
* feat: add thread message posting fixes #378 This enables the slack-orb to post to threads. See README updates for details.
- Loading branch information
Showing
4 changed files
with
206 additions
and
0 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
description: | | ||
Send a Slack notification to a channel and use the same message to post replies in a thread. | ||
`thread_id` parameter holds a thread identifier in case there are multiple notifications in the pipeline | ||
usage: | ||
version: 2.1 | ||
orbs: | ||
slack: circleci/[email protected] | ||
node: circleci/node:4.1 | ||
jobs: | ||
test: | ||
executor: | ||
name: node/default | ||
steps: | ||
- slack/notify: | ||
event: always | ||
channel: engineering | ||
thread_id: testing | ||
custom: | | ||
{ | ||
"blocks": [ | ||
{ | ||
"type": "section", | ||
"fields": [ | ||
{ | ||
"type": "plain_text", | ||
"text": "*Tests started.*", | ||
"emoji": true | ||
} | ||
] | ||
} | ||
] | ||
} | ||
- slack/notify: | ||
event: always | ||
channel: engineering | ||
thread_id: testing | ||
custom: | | ||
{ | ||
"blocks": [ | ||
{ | ||
"type": "section", | ||
"fields": [ | ||
{ | ||
"type": "plain_text", | ||
"text": "*Tests finished.*", | ||
"emoji": true | ||
} | ||
] | ||
} | ||
] | ||
} | ||
deploy: | ||
executor: | ||
name: node/default | ||
steps: | ||
- slack/notify: | ||
event: always | ||
channel: engineering | ||
thread_id: deployment | ||
custom: | | ||
{ | ||
"blocks": [ | ||
{ | ||
"type": "section", | ||
"fields": [ | ||
{ | ||
"type": "plain_text", | ||
"text": "*Deployment started.*", | ||
"emoji": true | ||
} | ||
] | ||
} | ||
] | ||
} | ||
- slack/notify: | ||
event: always | ||
channel: engineering | ||
thread_id: deployment | ||
custom: | | ||
{ | ||
"blocks": [ | ||
{ | ||
"type": "section", | ||
"fields": [ | ||
{ | ||
"type": "plain_text", | ||
"text": "*Deployment finished.*", | ||
"emoji": true | ||
} | ||
] | ||
} | ||
] | ||
} | ||
workflows: | ||
deploy_and_notify: | ||
jobs: | ||
- deploy | ||
- test: | ||
requires: | ||
- deploy |
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