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

Action fails silently if SLACK_BOT_TOKEN is not set #10

Closed
4 of 10 tasks
gr2m opened this issue Aug 22, 2021 · 3 comments
Closed
4 of 10 tasks

Action fails silently if SLACK_BOT_TOKEN is not set #10

gr2m opened this issue Aug 22, 2021 · 3 comments
Labels
enhancement New feature or request
Milestone

Comments

@gr2m
Copy link

gr2m commented Aug 22, 2021

Description

Action fails silently if SLACK_BOT_TOKEN is not set

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: 1.15.0

node version: I don't think you should ask that, as it's configured in your own action.yml

OS version(s): ubuntu-latest

Steps to reproduce:

        env:
          SLACK_BOT_TOKEN: ${{ secrets.DOES_NOT_EXIST }}

Expected result:

Should error with a helpful message

Actual result:

No output, success status

Attachments:

image

@seratch
Copy link
Member

seratch commented Nov 7, 2021

Thanks again. As with #9, the error can be improved by having some validation as part of the action.

@seratch seratch added the enhancement New feature or request label Nov 7, 2021
@seratch seratch added this to the 1.x milestone Nov 24, 2021
@zimeg zimeg modified the milestones: 1.x, 2.x Nov 16, 2024
@zimeg
Copy link
Member

zimeg commented Nov 16, 2024

With the @v2.0.0 release a step will now exit with an error if no token is included, so be sure to include a token 👻

- name: Post to a Slack channel
  uses: slackapi/slack-github-action@v2.0.0
  with:
    method: chat.postMessage
    token: ${{ secrets.SLACK_BOT_TOKEN }}  # Here's the aforementioned token 
    payload: |
      channel: ${{ secrets.SLACK_CHANNEL_ID }}
      text: "howdy <@channel>!"

Going to close this issue with this latest release, but if this step isn't causing errors please feel free to comment or open another issue! 🙏

@zimeg zimeg closed this as completed Nov 16, 2024
@zimeg zimeg modified the milestones: 2.x, 1.x Nov 16, 2024
@zimeg
Copy link
Member

zimeg commented Nov 16, 2024

Agh, meant to keep this tagged to 1.x where the issue is present! 😅

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

Successfully merging a pull request may close this issue.

3 participants