Update a Repository WebHook
PATCH/api/v5/repos/:owner/:repo/hooks/:id
Request
Path Parameters
owner stringrequired
Repository space address (address path of the enterprise, organization, or individual)
repo stringrequired
Repository path (path)
id stringrequired
The ID of the Webhook
Query Parameters
access_token stringrequired
User authorization code
- application/json
Body
urlstringrequired
Remote HTTP URL
encryption_typeinteger
Encryption Type: 0: Password, 1: Signature Key
passwordstring
This password is included when requesting the URL to prevent malicious requests.
push_eventsboolean
Push code to the repository
tag_push_eventsboolean
Submit the tag to the repository
issues_eventsboolean
Create/Close Issue
note_eventsboolean
Commented on Issue/Code, etc.
merge_requests_eventsboolean
merge_request_and_post_merge
Responses
- 200
Successful Response
Response Headers
- application/json
- Schema
- Example (auto)
- 1
Schema
urlstring
passwordstring
resultnull
project_idinteger
result_codeinteger
push_eventsinteger
tag_push_eventsinteger
issues_eventsinteger
note_eventsinteger
merge_requests_eventsinteger
created_atstring
{
"url": "string",
"password": "string",
"project_id": 0,
"result_code": 0,
"push_events": 0,
"tag_push_events": 0,
"issues_events": 0,
"note_events": 0,
"merge_requests_events": 0,
"created_at": "string"
}
Successful Example
{
"url": "http://duxwsqdkyx.cu/pxddddd",
"password": "123445",
"result": null,
"project_id": 282463,
"result_code": 0,
"push_events": false,
"tag_push_events": false,
"issues_events": true,
"note_events": false,
"merge_requests_events": true,
"created_at": "2024-09-26T16:13:27+08:00"
}