-
Notifications
You must be signed in to change notification settings - Fork 143
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
doc: how to reply to a message #309
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a few suggestions for the README but other than that LGTM!
README.md
Outdated
@@ -211,6 +212,37 @@ Please note that **the message update step does not accept a channel name.** Set | |||
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} | |||
``` | |||
|
|||
#### Reply to a message | |||
|
|||
If you want to post a message as a reply, you can populate the `payload` with a `"thread_ts"` field. The steps after the first message posting can have `"thread_ts": "${{ steps.slack.outputs.ts }}"` in their payload. In order to reply to an existing message. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you want to post a message as a reply, you can populate the `payload` with a `"thread_ts"` field. The steps after the first message posting can have `"thread_ts": "${{ steps.slack.outputs.ts }}"` in their payload. In order to reply to an existing message. | |
If you want to post a message as a threaded reply, you can populate the `payload` with a `thread_ts` field. This field should equal the `ts` value of the parent message of the thread. If you want to reply to a message previously posted by this Action, you can use the `ts` output provided as the `thread_ts` of a consequent threaded reply, e.g. `"thread_ts": "${{ steps.slack.outputs.ts }}"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Committed this along with the other changes 🙇
Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. Thanks for integrating Codecov - We've got you covered ☂️ |
Co-authored-by: Fil Maj <fmaj@slack-corp.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙌 This is great! Found something small in the payload that might need changing before a merge, but the instructions read well and I find this super helpful - I was excited to find a threaded message! 🚀
🤔 I'm also open to updating the example, but no blocker at all. The deployment "started/completed" makes sense for updating a message (it makes sense for threading too), but wondering if this could post "a new commit was made" with commit details in thread instead? Or extending the current example to also Just some thoughts, feel free to ignore! |
Co-authored-by: Ethan Zimbelman <ethan.zimbelman@me.com>
Can u publicate new release of slack-github-action with these changes? |
@fleytman @WilliamBergamin called it with this being available in the current version No other fixes or enhancements have landed since this current release and this appears in the current README, so I think we're alright to wait for another release for now 🚀 |
Summary
This resolved #187
This PR adds documentation describing how to reply to an existing message and a unit test to ensure the behavior is maintained
Requirements