config
. Multiple webhooks canconfig
as long as those webhooks do not have any events
that overlap.curl --location --request POST 'https://api.github.com/repos///hooks' \
--header 'Content-Type: application/json' \
--data-raw '{
"active": true,
"config": {
"content_type": "json",
"insecure_ssl": "0",
"url": "https://example.com/webhook"
},
"events": [
"push",
"pull_request"
],
"name": "web"
}'
{
"active": true,
"config": {
"content_type": "\"json\"",
"digest": "\"sha256\"",
"email": "\"foo@bar.com\"",
"insecure_ssl": "\"0\"",
"password": "\"foo\"",
"room": "\"roomer\"",
"secret": "\"********\"",
"subdomain": "\"foo\"",
"token": "\"abc\"",
"url": "https://example.com/webhook"
},
"created_at": "2011-09-06T17:26:27Z",
"events": [
"push",
"pull_request"
],
"id": 42,
"last_response": {
"code": 0,
"message": "string",
"status": "string"
},
"name": "web",
"ping_url": "https://api.github.com/repos/octocat/Hello-World/hooks/1/pings",
"test_url": "https://api.github.com/repos/octocat/Hello-World/hooks/1/test",
"type": "string",
"updated_at": "2011-09-06T20:39:23Z",
"url": "https://api.github.com/repos/octocat/Hello-World/hooks/1"
}
Authorization: Bearer ********************
true
to send notifications.json
and form
. The default is form
.secret
will be used as the key
to generate the HMAC hex digest value for delivery signature headers.web
to create a webhook. Default: web
. This parameter only accepts the value web
.json
and form
. The default is form
.secret
will be used as the key
to generate the HMAC hex digest value for delivery signature headers.【GitHub】API开发者 微信交流群
用微信扫右侧二维码,加入【GitHub】API开发者 交流群,互助沟通