mirror of
https://github.com/adnanh/webhook.git
synced 2025-08-23 18:12:17 +00:00
Merge 3d00687c18
into 2da9957e86
This commit is contained in:
commit
824d0bd08f
1 changed files with 39 additions and 6 deletions
|
@ -214,7 +214,11 @@ Values in the request body can be accessed in the command or to the match rule b
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
```
|
```
|
||||||
|
|
||||||
## Incoming Gitea webhook
|
## Incoming Gitea webhook
|
||||||
|
|
||||||
|
JSON version:
|
||||||
|
|
||||||
```json
|
```json
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
|
@ -229,7 +233,7 @@ Values in the request body can be accessed in the command or to the match rule b
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "payload",
|
"source": "payload",
|
||||||
"name": "pusher.name"
|
"name": "pusher.full_name"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"source": "payload",
|
"source": "payload",
|
||||||
|
@ -243,12 +247,12 @@ Values in the request body can be accessed in the command or to the match rule b
|
||||||
{
|
{
|
||||||
"match":
|
"match":
|
||||||
{
|
{
|
||||||
"type": "value",
|
"type": "payload-hmac-sha256",
|
||||||
"value": "mysecret",
|
"secret": "mysecret",
|
||||||
"parameter":
|
"parameter":
|
||||||
{
|
{
|
||||||
"source": "payload",
|
"source": "header",
|
||||||
"name": "secret"
|
"name": "X-Gitea-Signature"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -256,7 +260,7 @@ Values in the request body can be accessed in the command or to the match rule b
|
||||||
"match":
|
"match":
|
||||||
{
|
{
|
||||||
"type": "value",
|
"type": "value",
|
||||||
"value": "refs/heads/master",
|
"value": "refs/heads/main",
|
||||||
"parameter":
|
"parameter":
|
||||||
{
|
{
|
||||||
"source": "payload",
|
"source": "payload",
|
||||||
|
@ -270,6 +274,35 @@ Values in the request body can be accessed in the command or to the match rule b
|
||||||
]
|
]
|
||||||
```
|
```
|
||||||
|
|
||||||
|
YAML version:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
- id: webhook
|
||||||
|
execute-command: /home/adnan/redeploy-go-webhook.sh
|
||||||
|
command-working-directory: /home/adnan/go
|
||||||
|
pass-arguments-to-command:
|
||||||
|
- source: payload
|
||||||
|
name: head_commit.id
|
||||||
|
- source: payload
|
||||||
|
name: pusher.full_name
|
||||||
|
- source: payload
|
||||||
|
name: pusher.email
|
||||||
|
trigger-rule:
|
||||||
|
and:
|
||||||
|
- match:
|
||||||
|
type: payload-hmac-sha256
|
||||||
|
secret: mysecret
|
||||||
|
parameter:
|
||||||
|
source: header
|
||||||
|
name: X-Gitea-Signature
|
||||||
|
- match:
|
||||||
|
type: value
|
||||||
|
value: refs/heads/main
|
||||||
|
parameter:
|
||||||
|
source: payload
|
||||||
|
name: ref
|
||||||
|
```
|
||||||
|
|
||||||
## Slack slash command
|
## Slack slash command
|
||||||
```json
|
```json
|
||||||
[
|
[
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue