This commit is contained in:
Ian Roberts 2024-12-09 22:51:28 +08:00 committed by GitHub
commit 1aa4fd0ca8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 542 additions and 311 deletions

View file

@ -25,7 +25,7 @@ although the examples on this page all use the JSON format.
## Incoming Github webhook
This example works on 2.8+ versions of Webhook - if you are on a previous series, change `payload-hmac-sha1` to `payload-hash-sha1`.
This example works on 2.9+ versions of Webhook - if you are on a previous series, change the `check-signature` block to an equivalent `match` block, see the [Hook-Rules](Hook-Rules.md#legacy-match-rules-for-signatures) page for full details.
```json
[
@ -53,11 +53,11 @@ This example works on 2.8+ versions of Webhook - if you are on a previous series
"and":
[
{
"match":
"check-signature":
{
"type": "payload-hmac-sha1",
"algorithm": "sha1",
"secret": "mysecret",
"parameter":
"signature":
{
"source": "header",
"name": "X-Hub-Signature"
@ -185,11 +185,11 @@ Values in the request body can be accessed in the command or to the match rule b
"and":
[
{
"match":
"check-signature":
{
"type": "payload-hmac-sha256",
"algorithm": "sha256",
"secret": "mysecret",
"parameter":
"signature":
{
"source": "header",
"name": "X-Gogs-Signature"