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

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

Open
filmaj opened this issue Jun 27, 2023 · 0 comments · May be fixed by #220
Open

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

filmaj opened this issue Jun 27, 2023 · 0 comments · May be fixed by #220
Assignees
Labels
bug Something isn't working
Milestone

Comments

@filmaj
Copy link
Contributor

filmaj commented Jun 27, 2023

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.

@filmaj filmaj added the bug Something isn't working label Jun 27, 2023
@filmaj filmaj added this to the 1.25 milestone Jun 27, 2023
@filmaj filmaj self-assigned this Jun 27, 2023
filmaj added a commit that referenced this issue Jun 27, 2023
@filmaj filmaj linked a pull request Jun 27, 2023 that will close this issue
filmaj added a commit that referenced this issue Jun 27, 2023
@filmaj filmaj modified the milestones: 1.25, 1.26 Jan 26, 2024
@zimeg zimeg modified the milestones: 1.26, 1.27 Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants