获取 issue 关联的 pull requests
GET/api/v5/repos/:owner/:repo/issues/:number/pull_requests
Request
Path Parameters
owner stringrequired
仓库所属空间地址(企业、组织或个人的地址path)
repo stringrequired
仓库路径(path)
number stringrequired
Issue 编号(区分大小写,无需添加 # 号)
Query Parameters
access_token string
用户授权码
mode integer
1 (增强模式,传上述参数,返回 pr 的 mergeable 状态); 0(默认,不返回mergeable 状态)
Responses
- 200
成功响应
Response Headers
- application/json
- Schema
- Example (auto)
- Example
Schema
- Array [
- ]
- Array [
- ]
- Array [
- ]
idinteger
html_urlstring
diff_urlstring
numberinteger
statestring
titlestring
bodystring
created_atstring
updated_atstring
merged_atnull
closed_atnull
head object
refstring
shastring
repo object
pathstring
namestring
assigner object
loginstring
namestring
base object
refstring
shastring
repo object
pathstring
namestring
assignernull
assignees object[]
idstring
loginstring
namenull
avatar_urlnull
html_urlstring
testers object[]
idstring
loginstring
namestring
avatar_urlnull
html_urlstring
labels object[]
idinteger
colorstring
namestring
repository_idnull
urlnull
created_atstring
updated_atstring
text_colorstring
can_merge_checkinteger
{
"id": 0,
"html_url": "string",
"diff_url": "string",
"number": 0,
"state": "string",
"title": "string",
"body": "string",
"created_at": "string",
"updated_at": "string",
"head": {
"ref": "string",
"sha": "string",
"repo": {
"path": "string",
"name": "string"
},
"assigner": {
"login": "string",
"name": "string"
}
},
"base": {
"ref": "string",
"sha": "string",
"repo": {
"path": "string",
"name": "string"
}
},
"assignees": [
{
"id": "string",
"login": "string",
"html_url": "string"
}
],
"testers": [
{
"id": "string",
"login": "string",
"name": "string",
"html_url": "string"
}
],
"labels": [
{
"id": 0,
"color": "string",
"name": "string",
"created_at": "string",
"updated_at": "string",
"text_color": "string"
}
],
"can_merge_check": 0
}
{
"id": 67585,
"html_url": "https://api.gitcode.net/test/test/merge_requests/1",
"diff_url": "https://api.gitcode.net/test/test/merge_requests/1/diffs",
"number": 1,
"state": "open",
"title": "1",
"body": "new: 新增文件 test.txt 1",
"created_at": "2024-04-12T17:50:55.253+08:00",
"updated_at": "2024-04-20T15:58:30.657+08:00",
"merged_at": null,
"closed_at": null,
"head": {
"ref": "develop",
"sha": "061c446d55aae78c7a0f096b2d2dd0d6a1afb170",
"repo": {
"path": "paopao1",
"name": "paopao1"
},
"assigner": {
"login": "test",
"name": "test"
}
},
"base": {
"ref": "main",
"sha": "667d4ac032b2faa13d019753ac218b4f78338273",
"repo": {
"path": "paopao1",
"name": "paopao1"
},
"assigner": null
},
"assignees": [
{
"id": "65803cddcf1e2d1aa3d2e99f",
"login": "test",
"name": null,
"avatar_url": null,
"html_url": "https://api.gitcode.net/test"
}
],
"testers": [
{
"id": "65803cddcf1e2d1aa3d2e99f",
"login": "test",
"name": "test",
"avatar_url": null,
"html_url": "https://api.gitcode.net/test"
}
],
"labels": [
{
"id": 383707,
"color": "#CCCCCC",
"name": "wontfix",
"repository_id": null,
"url": null,
"created_at": "2024-04-19",
"updated_at": "2024-04-19",
"text_color": "#333333"
}
],
"can_merge_check": true
}