Skip to content

Update of existing slack post does not work with channel name, only channel id #136

@brownjeff

Description

@brownjeff

Description

When using update-ts: to update a previous action's slack post, the error Error: An API error occurred: channel_not_found is thrown.

The update works fine when using the channel ID, but does not work when using channel name.

What type of issue is this? (place an x in one of the [ ])

  • bug
  • enhancement (feature request)
  • question
  • documentation related
  • example code related
  • testing related
  • discussion

Requirements (place an x in each of the [ ])

  • I've read and understood the Contributing guidelines and have done my best effort to follow them.
  • I've read and agree to the Code of Conduct.
  • 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:

  1. Create subsequent actions like:
      - name: Post to a Slack channel
        id: slack
        uses: slackapi/slack-github-action@v1.22.0
        with:
          channel-id: '#mychannel'
          payload: |
            {
              "text": "first message"
            }
      - name: Update Existing Message in Slack
        id: slack_update
        uses: slackapi/slack-github-action@v1.22.0
        with:
          channel-id: '#mychannel'
          update-ts: ${{ steps.slack.outputs.ts }}
          payload: |
            {
              "text": "UPDATED MESSAGE"
            }
  1. Note: token set in env at global level
  2. Execute the workflow
  3. Notice first message is posted to slack
  4. Notice the slack post if never updated.
  5. Notice in github action page an error has occur with message: Error: An API error occurred: channel_not_found

Expected result:

Existing post is updated with the subsequent action.

Actual result:

Notice in github action page an error has occur with message: Error: An API error occurred: channel_not_found

Attachments:

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions