Add hook to project
POST
/v3/projects/{id}/hooksAdd hook to project
请求参数
Path 参数
id
string
必需
The ID of a project
Body 参数application/x-www-form-urlencoded
url
string
必需
The URL to send the request to
push_events
boolean
可选
Trigger hook on push events
issues_events
boolean
可选
Trigger hook on issues events
merge_requests_events
boolean
可选
Trigger hook on merge request events
tag_push_events
boolean
可选
Trigger hook on tag push events
note_events
boolean
可选
Trigger hook on note(comment) events
build_events
boolean
可选
Trigger hook on build events
pipeline_events
boolean
可选
Trigger hook on pipeline events
wiki_page_events
boolean
可选
Trigger hook on wiki events
enable_ssl_verification
boolean
可选
Do SSL verification when triggering the hook
token
string
可选
Secret token to validate received payloads; this will not be returned in the response
示例代码
返回响应
成功(201)
HTTP 状态码: 201
内容格式: JSONapplication/json
Add hook to project
数据结构
Deletes project hook
id
string
可选
url
string
可选
created_at
string
可选
push_events
string
可选
tag_push_events
string
可选
enable_ssl_verification
string
可选
project_id
string
可选
issues_events
string
可选
merge_requests_events
string
可选
note_events
string
可选
build_events
string
可选
pipeline_events
string
可选
wiki_page_events
string
可选
示例
{
"id": "string",
"url": "string",
"created_at": "string",
"push_events": "string",
"tag_push_events": "string",
"enable_ssl_verification": "string",
"project_id": "string",
"issues_events": "string",
"merge_requests_events": "string",
"note_events": "string",
"build_events": "string",
"pipeline_events": "string",
"wiki_page_events": "string"
}
最后修改时间: 1 个月前