Skip to content
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

Fix SLACK_THREAD_TS not working and improve documentation #212

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

albertoxamin
Copy link

@albertoxamin albertoxamin commented Dec 10, 2024

Fixes #210

Add support for SLACK_THREAD_TS variable and improve documentation.

  • Add outputs section in action.yml to include ts output.
  • Set ts output after sending the Slack message in main.go.
  • Add a function to extract the ts value from the Slack response in main.go.
  • Handle the SLACK_THREAD_TS variable in entrypoint.sh and main.sh.
  • Improve documentation in README.md on how to obtain the timestamp of the parent message.

For more details, open the Copilot Workspace session.

Fixes rtCamp#210

Add support for `SLACK_THREAD_TS` variable and improve documentation.

* Add `outputs` section in `action.yml` to include `ts` output.
* Set `ts` output after sending the Slack message in `main.go`.
* Add a function to extract the `ts` value from the Slack response in `main.go`.
* Handle the `SLACK_THREAD_TS` variable in `entrypoint.sh` and `main.sh`.
* Improve documentation in `README.md` on how to obtain the timestamp of the parent message.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/rtCamp/action-slack-notify/issues/210?shareId=XXXX-XXXX-XXXX-XXXX).
@MishaKav
Copy link

looks great, waiting for this change.
Thank you for this improvement 💪

| | | 2. Click on the "More actions" button (three vertical dots) on the message. |
| | | 3. Select "Copy link" from the dropdown menu. |
| | | 4. Paste the copied link in a text editor or any other place where you can see the full URL. |
| | | 5. The timestamp of the parent message is the last part of the URL, which looks like `1586130833.000100`. |
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we add a mention here that it's now possible to get a reference to a previously posted message via the ts output?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SLACK_THREAD_TS not working or needs better documentation
3 participants