PR Submitted File Change Information
GET/api/v5/repos/:owner/:repo/pulls/:number/files.json
Request
Path Parameters
owner stringrequired
Repository space address (organization or individual's address path)
repo stringrequired
Repository path (path)
number integerrequired
The ordinal number of the PR in this repository, i.e., which PR it is.
Example: 0
Query Parameters
access_token string
User authorization code
Responses
- 200
Successful Response
Response Headers
- application/json
- Schema
- Example (auto)
- Example
Schema
- Array [
- Array [
- ]
- ]
codeinteger
added_linesinteger
remove_linesinteger
countinteger
diff_refs object
base_shastring
start_shastring
head_shastring
diffs object[]
new_blob_idstring
statistic object
typestring
pathstring
old_pathstring
new_pathstring
viewinteger
head object
urlstring
commit_idstring
added_linesinteger
remove_linesinteger
content object
text object[]
line_contentstring
old_line object
line_codestring
line_numstring
new_line object
line_codestring
line_numstring
typestring
{
"code": 0,
"added_lines": 0,
"remove_lines": 0,
"count": 0,
"diff_refs": {
"base_sha": "string",
"start_sha": "string",
"head_sha": "string"
},
"diffs": [
{
"new_blob_id": "string",
"statistic": {
"type": "string",
"path": "string",
"old_path": "string",
"new_path": "string",
"view": 0
},
"head": {
"url": "string",
"commit_id": "string"
},
"added_lines": 0,
"remove_lines": 0,
"content": {
"text": [
{
"line_content": "string",
"old_line": {
"line_code": "string",
"line_num": "string"
},
"new_line": {
"line_code": "string",
"line_num": "string"
},
"type": "string"
}
]
}
}
]
}
{
"code": 0,
"added_lines": 7,
"remove_lines": 7,
"count": 2,
"diff_refs": {
"base_sha": "db015522f67b15e868c5f929ff1af4cba9ddd112",
"start_sha": "db015522f67b15e868c5f929ff1af4cba9ddd112",
"head_sha": "93cd8303ac07886610d738baf7ddd620f04ee778"
},
"diffs": [
{
"new_blob_id": "b575bd06b44029dc12771503388d61ea383169cb",
"statistic": {
"type": "text_type",
"path": "1",
"old_path": "1",
"new_path": "1",
"view": false
},
"head": {
"url": "https://pre-raw.gitcode.com/xiaogang/test/raw/93cd8303ac07886610d738baf7ddd620f04ee778/1",
"commit_id": "93cd8303ac07886610d738baf7ddd620f04ee778"
},
"added_lines": 3,
"remove_lines": 3,
"content": {
"text": [
{
"line_content": "111",
"old_line": {
"line_code": "356a192b7913b04c54574d18c28d46e6395428ab_1_1",
"line_num": "1"
},
"new_line": {
"line_code": "356a192b7913b04c54574d18c28d46e6395428ab_1_1",
"line_num": ""
},
"type": "old"
},
{
"line_content": "111222",
"old_line": {
"line_code": "356a192b7913b04c54574d18c28d46e6395428ab_2_1",
"line_num": ""
},
"new_line": {
"line_code": "356a192b7913b04c54574d18c28d46e6395428ab_2_1",
"line_num": "1"
},
"type": "new"
},
{
"line_content": " ",
"old_line": {
"line_code": "356a192b7913b04c54574d18c28d46e6395428ab_2_2",
"line_num": "2"
},
"new_line": {
"line_code": "356a192b7913b04c54574d18c28d46e6395428ab_2_2",
"line_num": "2"
}
},
{
"line_content": "1113",
"old_line": {
"line_code": "356a192b7913b04c54574d18c28d46e6395428ab_3_3",
"line_num": "3"
},
"new_line": {
"line_code": "356a192b7913b04c54574d18c28d46e6395428ab_3_3",
"line_num": ""
},
"type": "old"
},
{
"line_content": "1113333",
"old_line": {
"line_code": "356a192b7913b04c54574d18c28d46e6395428ab_4_3",
"line_num": ""
},
"new_line": {
"line_code": "356a192b7913b04c54574d18c28d46e6395428ab_4_3",
"line_num": "3"
},
"type": "new"
},
{
"line_content": " ",
"old_line": {
"line_code": "356a192b7913b04c54574d18c28d46e6395428ab_4_4",
"line_num": "4"
},
"new_line": {
"line_code": "356a192b7913b04c54574d18c28d46e6395428ab_4_4",
"line_num": "4"
}
},
{
"line_content": "444",
"old_line": {
"line_code": "356a192b7913b04c54574d18c28d46e6395428ab_5_5",
"line_num": "5"
},
"new_line": {
"line_code": "356a192b7913b04c54574d18c28d46e6395428ab_5_5",
"line_num": ""
},
"type": "old"
},
{
"line_content": "4442423",
"old_line": {
"line_code": "356a192b7913b04c54574d18c28d46e6395428ab_6_5",
"line_num": ""
},
"new_line": {
"line_code": "356a192b7913b04c54574d18c28d46e6395428ab_6_5",
"line_num": "5"
},
"type": "new"
},
{
"line_content": " 5555",
"old_line": {
"line_code": "356a192b7913b04c54574d18c28d46e6395428ab_6_6",
"line_num": "6"
},
"new_line": {
"line_code": "356a192b7913b04c54574d18c28d46e6395428ab_6_6",
"line_num": "6"
}
}
]
}
},
{
"new_blob_id": "1d3e5f08788ce215053e01fd54a76c6c6fbc1ddc",
"statistic": {
"type": "text_type",
"path": "2",
"old_path": "2",
"new_path": "2",
"view": false
},
"head": {
"url": "https://pre-raw.gitcode.com/xiaogang/test/raw/93cd8303ac07886610d738baf7ddd620f04ee778/2",
"commit_id": "93cd8303ac07886610d738baf7ddd620f04ee778"
},
"added_lines": 4,
"remove_lines": 4,
"content": {
"text": [
{
"line_content": " 11111",
"old_line": {
"line_code": "da4b9237bacccdf19c0760cab7aec4a8359010b0_1_1",
"line_num": "1"
},
"new_line": {
"line_code": "da4b9237bacccdf19c0760cab7aec4a8359010b0_1_1",
"line_num": "1"
}
},
{
"line_content": "22222",
"old_line": {
"line_code": "da4b9237bacccdf19c0760cab7aec4a8359010b0_2_2",
"line_num": "2"
},
"new_line": {
"line_code": "da4b9237bacccdf19c0760cab7aec4a8359010b0_2_2",
"line_num": ""
},
"type": "old"
},
{
"line_content": "22222adfsasf",
"old_line": {
"line_code": "da4b9237bacccdf19c0760cab7aec4a8359010b0_3_2",
"line_num": ""
},
"new_line": {
"line_code": "da4b9237bacccdf19c0760cab7aec4a8359010b0_3_2",
"line_num": "2"
},
"type": "new"
},
{
"line_content": " 3333",
"old_line": {
"line_code": "da4b9237bacccdf19c0760cab7aec4a8359010b0_3_3",
"line_num": "3"
},
"new_line": {
"line_code": "da4b9237bacccdf19c0760cab7aec4a8359010b0_3_3",
"line_num": "3"
}
},
{
"line_content": "",
"old_line": {
"line_code": "da4b9237bacccdf19c0760cab7aec4a8359010b0_4_4",
"line_num": "4"
},
"new_line": {
"line_code": "da4b9237bacccdf19c0760cab7aec4a8359010b0_4_4",
"line_num": ""
},
"type": "old"
},
{
"line_content": "",
"old_line": {
"line_code": "da4b9237bacccdf19c0760cab7aec4a8359010b0_5_4",
"line_num": "5"
},
"new_line": {
"line_code": "da4b9237bacccdf19c0760cab7aec4a8359010b0_5_4",
"line_num": ""
},
"type": "old"
},
{
"line_content": "4444",
"old_line": {
"line_code": "da4b9237bacccdf19c0760cab7aec4a8359010b0_6_4",
"line_num": "6"
},
"new_line": {
"line_code": "da4b9237bacccdf19c0760cab7aec4a8359010b0_6_4",
"line_num": ""
},
"type": "old"
}
]
}
}
]
}