99 lines
1.9 KiB
Plaintext
99 lines
1.9 KiB
Plaintext
[
|
|
{
|
|
"id": "programm-webhook",
|
|
"http-methods": ["PUSH"],
|
|
"execute-command": "/etc/webhook/programm-hook.sh",
|
|
"command-working-directory": "/etc/webhook/",
|
|
"response-message": "I got the payload!",
|
|
"response-headers":
|
|
[
|
|
{
|
|
"name": "Access-Control-Allow-Origin",
|
|
"value": "*"
|
|
}
|
|
],
|
|
"pass-arguments-to-command":
|
|
[
|
|
{
|
|
"source": "payload",
|
|
"name": "ref"
|
|
},
|
|
{
|
|
"source": "payload",
|
|
"name": "repository.name"
|
|
}
|
|
],
|
|
"trigger-rule":
|
|
{
|
|
"and":
|
|
[
|
|
{
|
|
"match":
|
|
{
|
|
"type": "payload-hmac-sha1",
|
|
"secret": "1234",
|
|
"parameter":
|
|
{
|
|
"source": "header",
|
|
"name": "X-Hub-Signature"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"id": "assets-webhook",
|
|
"execute-command": "/etc/webhook/assets-hook.sh",
|
|
"command-working-directory": "/etc/webhook/",
|
|
"response-message": "I got the payload!",
|
|
"response-headers":
|
|
[
|
|
{
|
|
"name": "Access-Control-Allow-Origin",
|
|
"value": "*"
|
|
}
|
|
],
|
|
"pass-arguments-to-command":
|
|
[
|
|
{
|
|
"source": "payload",
|
|
"name": "repository.name"
|
|
},
|
|
{
|
|
"source": "payload",
|
|
"name": "ref"
|
|
}
|
|
],
|
|
"trigger-rule":
|
|
{
|
|
"and":
|
|
[
|
|
{
|
|
"match":
|
|
{
|
|
"type": "payload-hmac-sha256",
|
|
"secret": "1234",
|
|
"parameter":
|
|
{
|
|
"source": "header",
|
|
"name": "X-Hub-Signature-256"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"match":
|
|
{
|
|
"type":"value",
|
|
"value": "refs/heads/main",
|
|
"parameter":
|
|
{
|
|
"source": "payload",
|
|
"name": "ref"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
] |