Open ipavlov314 opened 3 months ago
Hi @ipavlov314 thanks for writing in 💯
I'm not sure how the this action may be posting to the wrong channel 🤔
From what you provided it seem like the default channel value comes from an environment variable and gets overwritten when an input value is provided, have you tried echoing
the value of ${{ inputs.slack_channel }}
before executing the the post message step?
This action is stateless, it does not save what channels it has posted to in the past
Thanks for quick response. In logs for action I see it set to right channel
Run slackapi/slack-github-action@70cd7be8e40a46e8b0eced40b0de447bdb42f68e
with:
payload-file-path: my.json
channel-id: XXXXX // added to mack channel id
payload-file-path-parsed: true
However payload was send to the other one, any possible redirection regarding firewall or any other infrastructure settings you my think?
Have you tried printing out the channel_id
output value returned from the step and ensuring it is the same one sent as an input?
I've looked at the source code there does not seem to be any logic that may change the channel-id
value, I am also unable to reproduce this behavior
I'm also a bit confused here, but can the payload-file-path
content contain a top-level channel
attribute different from the channel-id
in the action? That might override the channel-id
provided as an input parameter if so 🤔
Description
I see that sometimes payloads are sent to the wrong channel.
I have channels for pr-notifications and nightly-notifications, with two separate workflows for PRs and Nightly builds. Somehow, PR payloads with results are sent to nightly-notifications. Some days it happens more, some days less.
What type of issue is this? (place an
x
in one of the[ ]
)Requirements (place an
x
in each of the[ ]
)Bug Report
Reproducible in:
package version: slackapi/slack-github-action@70cd7be8e40a46e8b0eced40b0de447bdb42f68e # v1.2.6
node version:
OS version(s): Mac 14.2.1 (23C71)
Steps to reproduce:
Expected result:
Payload should be send only to provided channels
Actual result:
I see that sometimes payloads are sent to the wrong channel.
Attachments:
Set up I have
Also public channel ids are pretty different