-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Doc updated list of supported webhooks and added example #8388
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
Conversation
} | ||
|
||
// check authorization | ||
if ($decoded['secret'] != $secret_key) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You shouldn't rely on this field existing, it is currently deprecated as we are migrating towards using the checksum header to validate hook content. Would you be able to update this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't know and I actually just learnt about it from you. How does the new system work? Is there any doc about it yet?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this https://togithub.com/gogs/gogs/issues/4233 and this #3901 should provide details you are looking for :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
interesting indeed, let me check that and make changes to the script
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@techknowlogick I've updated the code snippet and tested it. It works. I hope that's what you had in mind.
Codecov Report
@@ Coverage Diff @@
## master #8388 +/- ##
=========================================
Coverage ? 41.79%
=========================================
Files ? 497
Lines ? 65639
Branches ? 0
=========================================
Hits ? 27436
Misses ? 34685
Partials ? 3518 Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for all the docs improvements you are doing :)
The list of supported webhooks was not up-to-date and I added an example of how to receive the hook.