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

Support multiple channel IDs #118

Closed
4 of 10 tasks
glenthomas opened this issue Aug 16, 2022 · 3 comments · Fixed by #126
Closed
4 of 10 tasks

Support multiple channel IDs #118

glenthomas opened this issue Aug 16, 2022 · 3 comments · Fixed by #126
Labels
enhancement New feature or request good first issue Good for newcomers
Milestone

Comments

@glenthomas
Copy link

Description

The channel-id input supports a single channel ID. Can this be updated to support multiple comma-separated channel ID's?

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.
@WilliamBergamin WilliamBergamin added enhancement New feature or request good first issue Good for newcomers labels Aug 16, 2022
@WilliamBergamin
Copy link

Hi @glenthomas thanks for writing in!

Supporting an array type for the channel-id property seems like a reasonable feature, I went ahead and labeled the issue as an enhancement.

In the mean time I believe using something like multiple steps in a job could be a valid work around for the issue

on: [push]

jobs:
  new_push_job:
    runs-on: ubuntu-latest
    name: Post to slack channels
    steps:
    - name: Publish to slack channel A via bot token
      id: slack
      uses: slackapi/slack-github-action@v1.21.0
      with:
        channel-id: 'CHANNEL_ID_A'
        slack-message: 'posting from a github action to channel A!'
      env:
        SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
    - name: Publish to slack channel B via bot token
      id: slack
      uses: slackapi/slack-github-action@v1.21.0
      with:
        channel-id: 'CHANNEL_ID_B'
        slack-message: 'posting from a github action to channel B!'
      env:
        SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}

@filmaj filmaj added this to the 1.22 milestone Sep 13, 2022
@filmaj
Copy link
Contributor

filmaj commented Sep 13, 2022

FYI this has been released in v1.22. Big ups to @treemmett for implementing, adding tests and updating the docs ❤️ .

@amirkarimi
Copy link

amirkarimi commented Dec 19, 2023

Thanks! What about message updates. How does it work in this case? I tried passing multiple channels and then updating the messages with the same returned ts. It only updates the message in one of the channels and returns this error: Error: An API error occurred: message_not_found.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants