Skip to content

If both webhook URL and bot token are specified, action will run twice #219

Closed

Description

@filmaj

Description

I think this mostly just affects running the tests in this repo. Currently, each individual test in this repo's GH Action CI workflow file executes possibly multiple times because of this bug.

If a bot token is specified via an environment variable, then this conditional block will execute, which might result in posting or updating a message.

If a webhook URL is specified via an environment varaible, then this conditional block will execute, possibly POSTing to the webhook URL.

If you consume this action and use it using a bot token, but also specify the webhook URL environment variable, the action will POST to the webhook URL.

I think the solution is to do either-or: either use the bot token, or use the webhook URL. A fix for this issue should also clean up the usage of the webResponse variable in the code, as this is only set and used in the bot-token scenario.

Activity

  1. added this to the 1.25 milestone on Jun 27, 2023
  2. self-assigned this
    on Jun 27, 2023
  3. added 2 commits that reference this issue on Jun 27, 2023
    19c39a5
    3384e3a
  4. modified the milestones: 1.25, 1.26 on Jan 26, 2024
  5. modified the milestones: 1.26, 1.27 on Apr 19, 2024
  6. modified the milestones: 1.27, 1.x on Aug 29, 2024
  7. zimeg commented on Nov 16, 2024

    @zimeg
    Member

    👋 This is now fixed with @v2 where including both webhook and token will cause the step to exit with an error!

    I do agree that having both techniques possible at the same time can cause a bit of confusion. I'd also be so interested in knowing of workflows that share payloads between different techniques in general 👀

    I'll close this issue with the latest changes 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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