-
Notifications
You must be signed in to change notification settings - Fork 147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Support thread_ts parameter to post the new message as a thread #303
Conversation
032e1fb
to
8c09f74
Compare
… reply to another Closes slackapi#187
8c09f74
to
067ee68
Compare
Thanks for the contribution @ArnaudRinquin 💯 Before I move forward with this would you mind testing out what happens if the Based on the behavior from this line it seems like the spread operator should support - name: Send GitHub trigger payload to Slack Workflow Builder
id: slack
uses: slackapi/[email protected]
with:
channel-id: 'SLACK_CHANNEL_ID' # ID of Slack Channel you want to post to
payload: |
{
"blocks": [
{ "type": "divider" },
{
"type": "image",
"title": {
"type": "plain_text",
"text": "Slack Slack Slack",
"emoji": true
},
"image_url": "https://media.makeameme.org/created/a-slack-this.jpg",
"alt_text": "marg"
},
{
"type": "actions",
"elements": [
{
"type": "button",
"text": {
"type": "plain_text",
"text": "${{ github.sha }}"
},
"url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
}
]
}
],
"thread_ts": "TIMESTAMP_OF_A_MESSAGE"
}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} |
@WilliamBergamin I've added 2 test cases ensuring payload provided |
@ArnaudRinquin these are awesome changes 💯 but implementing the simplest solution for this problem should create a more maintainable project It would be awesome if this PR could include the |
I'd be happy to validate the thread_ts value but I can't find any spec on the expected shape. Even in official doc the type looks like it can be a simple string. I'll had more tests if you can provide me some hints on how to validate. I've updated README.md example of specifying thread_ts from payload. |
@WilliamBergamin, what is blocking this pr at the moment? |
Closing in favor of #309 |
Closes #187
Summary
Describe the goal of this PR. Mention any related Issue numbers.
Requirements (place an
x
in each[ ]
)