-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Custom event > releases payload does not contain secret #5173
Comments
) affects webhooks for: * Delete * Fork * IssueComment * Release Resolves: go-gitea/gitea#4732, go-gitea/gitea#5173 Signed-off-by: Berengar W. Lehr <[email protected]>
…5208) * Updated dependency manager via `dep ensure -update code.gitea.io/sdk` * Gopkg.toml was not changed as sdk version is set to "master" * affects webhooks for: Delete, Fork, IssueComment, Release * also contains changes from go-gitea/go-sdk#125 and hence a swagger update Signed-off-by: Berengar W. Lehr <[email protected]> Resolves: #4732, #5173
I just tested the latest version Edit: I tried this on the demo instance with the following settings. As you can see here, no requests are received http://requestbin.net/r/1oa26911?inspect |
Could you explain "trigger a test delivery"? I tried to retrace your steps but couldn't find the same error |
I simply press the "Test Delivery" button :) |
Okey, but it looks to me as if the TestDelivery is always executing a push event. If your webhook only acts on releases it will not be triggered. Line 677 in 4c1f1f9
Perhaps the button should be renamed to "Test push event" |
My intuition was that the button tests whatever hook is specified at the top?! I pushed a tag (release) to the repository under https://try.gitea.io/test1337/Hooktest and it did not trigger a request to the request bin. So something seems to be broken, no? Edit: Okay, I just figure out what the problem is. I am actually not sure whether it's a problem or by design. But there is definitely some confusion. If I create a tag and push it, the tag appears under So here is some inconstancy. Either a normal tag should not be a release or it is considered a release and it should trigger the hook. |
@AuspeXeu tag without release in release list page is displayed differently |
release will be triggered when you create release (either by UI or API) either on new tag or existing. Pushing tag from git command will not create release, this is by design so |
Okay, I guess it's all working correctly then in that case. |
Closeable? |
I guess so :) - thanks for your efforts! |
Test delivery will always issue push event |
Why? :D |
Because it is just for testing if target can be reached not to test actual functionaliity |
Well, but exactly this is not happening. If you set the hook to custom event as I showed above, and then press "test delivery" nothing happens. It claims that a fake event has been generated but no request ever reaches the specified endpoint. And no request reaches https://requestbin.fullcontact.com/1h3kkfs1?inspect |
Ok, now I understand the problem. It is tested if event type is enabled before sending. This would require option to choose what kind of event to send then and implement each event type webhook content generation. I don't think that is worth time needed to develop this the gains. |
Well, if we could at least have a delivery test that would be great :) One option could be, as you said, to always send a push event type. That way one could at least verify that the endpoint is reachable, no? |
If you enable push events and then try test delivery than it will work and do request. Later you can disable it again |
Basically my point is, if someone is new to gitea and sets up a custom event webhook, they will wonder why the test delivery does not work unless the read this particular issue with our comments. |
We could probably add warning if push event is not enabled |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions. |
Whats the state of this issue? |
Secret inside the payload has been deprecated, and the hmac header of webhook should now be used. Closing this issue. |
Description
When setting up a gitea webhook, one can provide a secret that is supposed to be included in the delivered POST
application/json
payload. This works fine for "Push Events", however when choosing "Custom Events..." and selecting "Releases", this secret is not included in the payload anymore.The text was updated successfully, but these errors were encountered: