Add support for sending thread_broadcast
Description
Would like the ability to send a threaded reply notification to a channel with thread_broadcast.
This could be surfaced as an optional flag to broadcast the threaded message to the channel, as mentioned in #119
What type of issue is this? (place an x in one of the [ ])
- [ ] bug
- [x] enhancement (feature request)
- [ ] question
- [ ] documentation related
- [ ] example code related
- [ ] testing related
- [ ] discussion
Requirements (place an x in each of the [ ])
- [x] I've read and understood the Contributing guidelines and have done my best effort to follow them.
- [x] I've read and agree to the Code of Conduct.
- [x] I've searched for any related issues and avoided creating a duplicate issue.
Bug Report
Filling out the following details about bugs will help us solve your issue sooner.
Reproducible in:
package version:
node version:
OS version(s):
Steps to reproduce:
Expected result:
What you expected to happen
Actual result:
What actually happened
Attachments:
Logs, screenshots, screencast, sample project, funny gif, etc.
Hey @dstrates and those following along 👋 We don't support a specific input parameter for the reply_broadcast parameter but this can be included in the payload with a message to decide if the threaded message should be broadcast:
- uses: slackapi/slack-github-action@v1
with:
channel-id: "C0123456789"
payload: |
{
"reply_broadcast": true,
"thread_ts": "${{ steps.example.outputs.ts }}",
"text": "Status update: LGTM!"
}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
This found better support in the @v2.0.0 release, where the payload is now sent to a provided Slack API method like so:
- name: Post the first example message
uses: slackapi/[email protected]
id: example
with:
method: chat.postMessage
token: ${{ secrets.SLACK_BOT_TOKEN }}
payload: |
channel: ${{ secrets.SLACK_CHANNEL_ID }}
text: "Something started..."
- name: Broadcast a reply to the example
uses: slackapi/[email protected]
with:
method: chat.postMessage
token: ${{ secrets.SLACK_BOT_TOKEN }}
payload: |
channel: ${{ secrets.SLACK_CHANNEL_ID }}
reply_broadcast: true
thread_ts: "${{ steps.example.outputs.ts }}"
text: "Status update: LGTM!"
This is a super great suggestion and I'll close this issue now that we're supporting it! But please write back if you're finding strangeness with these changes 🙏