创建Issue
POST/api/v5/repos/:owner/issues
Request
Path Parameters
owner stringrequired
仓库所属空间地址(组织或个人的地址path)
Query Parameters
access_token stringrequired
用户授权码
- application/json
Body
- Array [
- ]
repostringrequired
仓库路径
titlestringrequired
Issue标题
bodystringrequired
Issue描述
assigneestring
Issue负责人的username,多个用英文逗号隔开
milestoneinteger
里程碑序号
labelsstring
用逗号分开的标签,名称要求长度在 2-20 之间且非特殊字符。如: bug,performance
security_holestring
是否是私有issue(默认为false)
template_pathstring
issue模板路径,项目模板支持.gitcode,.github,.gitee目录下的文件,组织模板仅支持.gitcode项目下的.gitcode目录下的文件
issue_typestring
issue类型(企业版支持),设置值需与企业issue高级功能中的设置保持一致
issue_severitystring
issue优先级(企业版支持),设置值需与企业issue高级功能中的设置保持一致
custom_fields object[]
自定义字段信息(企业版支持)
field_namestring
字段名称
field_valuesstring[]
字段的值数组
Responses
- 200
成功响应
Response Headers
- application/json
- Schema
- Example (auto)
- Example
Schema
- Array [
- ]
- Array [
- ]
idinteger
html_urlstring
numberinteger
statestring
titlestring
bodystring
user object
avatar_urlstring
events_urlnull
followers_urlnull
following_urlnull
gists_urlnull
html_urlstring
idstring
loginstring
member_rolenull
namestring
organizations_urlnull
received_events_urlnull
remarknull
repos_urlnull
starred_urlnull
subscriptions_urlnull
typenull
urlnull
assigneenull
repository object
idinteger
full_namestring
pathstring
namestring
descriptionstring
created_atstring
updated_atstring
created_atstring
updated_atstring
finished_atnull
labels object[]
idinteger
namestring
colorstring
created_atstring
updated_atstring
label添加时间
stagestring
severitystring
custom_fields object[]
自定义字段信息
field_namestring
自定义字段名称
field_typestring
自定义字段的类型。text_single:单行文本,text_multi:多行文本,integer:整数,decimal:小数,date:日期,select_single:单选下拉,select_multi:多选下拉,member_single:单选成员,member_multi:多选成员
field_visibilitystring
可见性。0:仅管理员可见,1:所有人可见
field_valuesstring[]
自定义字段的值
{
"id": 0,
"html_url": "string",
"number": 0,
"state": "string",
"title": "string",
"body": "string",
"user": {
"avatar_url": "string",
"html_url": "string",
"id": "string",
"login": "string",
"name": "string"
},
"repository": {
"id": 0,
"full_name": "string",
"path": "string",
"name": "string",
"description": "string",
"created_at": "string",
"updated_at": "string"
},
"created_at": "string",
"updated_at": "string",
"labels": [
{
"id": 0,
"name": "string",
"color": "string",
"created_at": "string",
"updated_at": "string"
}
],
"stage": "string",
"severity": "string",
"custom_fields": [
{
"field_name": "string",
"field_type": "string",
"field_visibility": "string",
"field_values": [
"string"
]
}
]
}
{
"id": 152642,
"html_url": "https://test.gitcode.net/dengmengmian/test01/issues/15",
"number": 15,
"state": "opened",
"title": "半月据",
"body": "节油料被引系活力级少本化段维家住实。常气前步证时第样日所阶效温界到量。个导土机技亲布接增论始高世收圆流级集。此般区才听党机达两收文斗公加白。代军前分写第图美市与道及间。",
"user": {
"avatar_url": "https://gitcode-img.obs.cn-south-1.myhuaweicloud.com:443/fa/fe/f32a9fecc53e890afbd48fd098b0f6c5f20f062581400c76c85e5baab3f0d5b2.png",
"events_url": null,
"followers_url": null,
"following_url": null,
"gists_url": null,
"html_url": "https://test.gitcode.net/dengmengmian",
"id": "661ce4eab470b1430d456154",
"login": "dengmengmian",
"member_role": null,
"name": "麻凡_",
"organizations_url": null,
"received_events_url": null,
"remark": null,
"repos_url": null,
"starred_url": null,
"subscriptions_url": null,
"type": null,
"url": null
},
"assignee": null,
"repository": {
"id": 152642,
"full_name": "dengmengmian/test01",
"path": "test01",
"name": "test01",
"description": "",
"created_at": "2024-04-18T14:35:15.479+08:00",
"updated_at": "2024-04-18T14:35:15.479+08:00"
},
"created_at": "2024-04-18T14:35:15.479+08:00",
"updated_at": "2024-04-18T14:35:15.479+08:00",
"finished_at": null,
"labels": [
{
"id": 382379,
"name": "enim",
"color": "#428BCA"
},
{
"id": 382378,
"name": "proident",
"color": "#428BCA"
},
{
"id": 382377,
"name": "qui",
"color": "#428BCA"
}
],
"stage": "New",
"severity": "Major"
}