Skip to content

SLACK_THREAD_TS not working or needs better documentation #210

Open
@kishore-vkrn

Description

@kishore-vkrn

Hi,

From README for variable SLACK_THREAD_TS I got

If you want to send message in a thread, you can pass the timestamp of the parent message to this variable. You can get the timestamp of the parent message from the message URL in Slack. (ex: SLACK_THREAD_TS: 1586130833.000100)

But still not clear how would I get the timestamp of the parent mesage. Looking at slack api ts seems a better output but when I tried I get separate messages not in threads

jobs:
  send-slack-notification:
    runs-on: [ Standard, self-hosted, X64, ubuntu ]
    needs: [validate-inputs]
    steps:
      - name: Notify Slack - Deployment Started
        id: slack-notify
        uses: actions/[email protected]
        if: always()
        env:
          SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
          SLACK_MESSAGE: "*» ${{ github.event.inputs.env }}* deployment started. _${{ github.event.inputs.tag }}_"
          MSG_MINIMAL: actions url, commit
          SLACK_FOOTER: ""
          SLACK_COLOR: ${{ job.status }} 
          
  ec2-deployment:
    needs: [send-slack-notification]
    runs-on: [ Standard, self-hosted, X64, ubuntu ]
    steps:
      - name: Notify Slack - Deployment status
        uses: actions/[email protected]
        if: always()
        env:
          SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
          MSG_MINIMAL: actions url, commit
          SLACK_MESSAGE: "*» ${{ github.event.inputs.env }}*. deployment status  → ${{ job.status }}"
          SLACK_FOOTER: ""
          SLACK_COLOR: ${{ job.status }}
          SLACK_THREAD_TS: "${{ needs.slack-notify.outputs.ts }}"

Better documentation or on how to use this will be appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions