跳到主要内容

Issue Event

issue事件参数说明

请求头

参数名称类型参数说明
User-Agentstring
Content-Typestring
X-GitCode-Eventstring事件类型,Issue Hook代表issue事件
X-GitCode-Deliverystring请求唯一id

请求参数

参数名称参数类型参数说明
produce_random_idstring随机生成的事件ID
event_typestring事件类型,此处为 "issue"
object_kindstring对象类型,此处为 "issue"
object_attributes.idintegerIssue的ID
object_attributes.iidintegerIssue在项目中的ID
object_attributes.project_idinteger项目ID
object_attributes.titlestringIssue标题
object_attributes.descriptionstringIssue描述内容
object_attributes.statestringIssue状态(opened: 开启的, closed: 关闭的)
object_attributes.actionstring操作类型(open: 开启, close: 关闭,  reopen: 重新开启, update: 更新)
object_attributes.created_atstring创建时间
object_attributes.updated_atstring更新时间
object_attributes.confidentialboolean是否为私密Issue
object_attributes.urlstringIssue的Web访问地址
object_attributes.time_estimateinteger
object_attributes.total_time_spentinteger
object_attributes.human_time_estimateinteger
object_attributes.human_total_time_spentinteger
object_attributes.assignee_idsarray指派人ID列表
object_attributes.author.idinteger作者ID
object_attributes.author.namestring作者名称
object_attributes.author.usernamestring作者用户名
object_attributes.author.emailstring作者邮箱
object_attributes.author.avatar_urlstring作者头像URL
object_attributes.author.web_urlstring作者个人主页URL
project.idinteger项目ID
project.namestring项目名称
project.web_urlstring项目Web访问地址
project.git_ssh_urlstring项目SSH克隆地址
project.git_http_urlstring项目HTTP克隆地址
project.namespacestring项目命名空间
project.visibility_levelinteger项目可见性级别(0: 私有, 1公开)
project.path_with_namespacestring带命名空间的项目路径
project.default_branchstring默认分支
user.idinteger触发事件的用户ID
user.namestring触发事件的用户名称
user.usernamestring触发事件的用户名
user.emailstring触发事件的用户邮箱
user.avatar_urlstring触发事件的用户头像URL
labelsarrayIssue的标签列表
changesobjectIssue变更的字段及其新值
manual_buildboolean是否为手动触发
uuidstring事件唯一标识符

请求参数示例

{
"produce_random_id": "9f2bcb9c4c8a41d8bc89e8dc61bbf3ac",
"event_type": "issue",
"object_attributes": {
"iid": 8,
"created_at": "2025-05-07T14:19:24.490+08:00",
"description": "内容",
"title": "测试issue",
"updated_at": "2025-05-07T14:19:24.490+08:00",
"project_id": 1848674,
"action": "open",
"id": 3084068,
"state": "opened",
"confidential": false,
"relative_position": 1073745823,
"author": {
"id": 173794,
"name": "xiaogang_o",
"username": "xiaogang_o",
"iam_id": "ec7b9ce722694cce89d8186a8ec5645f",
"nick_name": "肖刚",
"state": "active",
"avatar_url": "https://cdn-img.gitcode.com/ee/ca/756863eec250a6a067148d4d4fe71d28c3b9716a6f79c03a9f460543fa3dc838.jpg?time=1711433667506",
"email": "xiaogang@csdn.net",
"web_url": "https://gitcode.com/xiaogang_o"
},
"url": "https://gitcode.com/xiaogang_o/test/issues/8",
"time_estimate": 0,
"total_time_spent": 0,
"human_time_estimate": 0,
"human_total_time_spent": 0,
"assignee_ids": []
},
"project": {
"path_with_namespace": "xiaogang_o/test",
"ssh_url": "git@gitcode.com:xiaogang_o/test.git",
"git_http_url": "https://gitcode.com/xiaogang_o/test.git",
"git_ssh_url": "git@gitcode.com:xiaogang_o/test.git",
"url": "git@gitcode.com:xiaogang_o/test.git",
"http_url": "https://gitcode.com/xiaogang_o/test.git",
"web_url": "https://gitcode.com/xiaogang_o/test",
"avatar_url": "https://cdn-img.gitcode.com/ee/ca/756863eec250a6a067148d4d4fe71d28c3b9716a6f79c03a9f460543fa3dc838.jpg?time=1711433667506",
"name": "test",
"namespace": "xiaogang_o",
"visibility_level": 0,
"default_branch": "main",
"id": 1848674,
"homepage": "https://gitcode.com/xiaogang_o/test"
},
"user": {
"avatar_url": "https://cdn-img.gitcode.com/ee/ca/756863eec250a6a067148d4d4fe71d28c3b9716a6f79c03a9f460543fa3dc838.jpg?time=1711433667506",
"name": "xiaogang_o",
"id": 173794,
"email": "xiaogang@csdn.net",
"username": "xiaogang_o"
},
"manual_build": false,
"object_kind": "issue",
"labels": [],
"uuid": "e4e3a55e-4f58-42dd-a134-c128259809f2"
}