Skip to content

Passing an empty token or webhook url does not cause an error #123

@koki-develop

Description

@koki-develop

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 [ ])

  • 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: v1.21.0

node version:

OS version(s): ubuntu-22.04

Steps to reproduce:

  1. Set SLACK_BOT_TOKEN or SLACK_WEBHOOK_URL to an empty string
  2. 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/slack-github-action@v1.21.0
        env:
          SLACK_WEBHOOK_URL: ""
      - uses: slackapi/slack-github-action@v1.21.0
        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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions