Get Pull Requests Associated with the Issue
GET/api/v5/repos/:owner/:repo/issues/:number/pull_requests
Request
Path Parameters
owner stringrequired
Repository space address (address path of the enterprise, organization, or individual)
repo stringrequired
Repository path (path)
number stringrequired
Issue Number (case-sensitive, do not add #)
Query Parameters
access_token string
User authorization code
mode integer
1 (enhanced mode, pass the above parameter, return the mergeable status of PR); 0 (default, do not return mergeable status)
Responses
- 200
Successful Response
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: Added file 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
}