Passing an empty token or webhook url does not cause an error
Description
If SLACK_BOT_TOKEN or SLACK_WEBHOOK_URL is set to an empty string, the action will succeed.
Is this intentional?
What type of issue is this? (place an x in one of the [ ])
- [x] bug
- [ ] enhancement (feature request)
- [ ] question
- [ ] documentation related
- [ ] example code related
- [ ] testing related
- [ ] discussion
Requirements (place an x in each of the [ ])
- [x] I've read and understood the Contributing guidelines and have done my best effort to follow them.
- [x] I've read and agree to the Code of Conduct.
- [x] 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: v1.21.0
node version:
OS version(s): ubuntu-22.04
Steps to reproduce:
- Set
SLACK_BOT_TOKENorSLACK_WEBHOOK_URLto an empty string - Run workflow
Expected result:
Expect the action to fail.
Actual result:
The action will succeed. Naturally, no message is sent.
Attachments:
Debugged in this repository: https://github.com/koki-develop/slack-github-action-debug
You can see that the action is not failing even though SLACK_BOT_TOKEN and SLACK_WEBHOOK_URL are set to empty characters or nonexistent secret.
Log: https://github.com/koki-develop/slack-github-action-debug/actions/runs/2991645944
- uses: slackapi/[email protected] env: SLACK_WEBHOOK_URL: "" - uses: slackapi/[email protected] env: SLACK_WEBHOOK_URL: ${{ secrets.NON_EXSISTENT_SECRET }}https://github.com/koki-develop/slack-github-action-debug/blob/2fac0fd12078736e04359578a64b6e760faf86a6/.github/workflows/main.yml#L10-L15