-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Multiple Webhooks sends wrong payload #2485
Comments
Thanks your feedback! What's your Gogs version? |
I use gogs/gogs latest docker image, it's 0.8.23.0126. |
Thanks. Does this problem happen 100%? |
ping @mathicalee |
I just got the same problem. And here's all the info I could get: Custom built hook which gets push events works fine, and outputs standard payload. Slack hook with default settings, outputs slack payload. Drone hook which gets push events outputs slack payload. They were ordered in the database in the same order I wrote them (std -> slack -> std) Removing the slack hook, test delivery and everything's working smoothly. When I added back the slack hook, as it was added after the drone hook, everything worked smoothly again. So my best guess is that a value that switches between the two hook types is changed when it gets to a slack webhook, but it does not "change back" when it gets to a standard webhook. Gogs version 0.8.31.0205 |
@thehowl thanks for the info! |
When repository contains a Slack type hook, it changes original payload content. This patch fixes it by using a local object to store newly created Slack payload instead of assigning back to the same variable.
Just pushed a fix to |
ping @mathicalee |
Close as fixed. |
I had 2 webhooks registered to my gogs repository: to slack and to drone.
The slack webhook works fine, but the drone webhook has a payload that should be sent to slack, which leads to 500 error in drone.
If I remove the slack webhook, then the drone webhook works fine.
The text was updated successfully, but these errors were encountered: