Pull Request Commit File List
GET/api/v5/repos/:owner/:repo/pulls/:number/files
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
total_added_lines
Example:
total_removed_lines
Example:
- application/json
- Schema
- Example (auto)
- 1
- 2
Schema
- Array [
- ]
shastring
filenamestring
statusstring
additionsstring
deletionsstring
blob_urlstring
raw_urlstring
patch object
diffstring
new_pathstring
old_pathstring
a_modestring
b_modestring
new_fileinteger
renamed_fileinteger
deleted_fileinteger
too_largeinteger
added_linesinteger
removed_linesinteger
target_branchstring
Target branch
source_branchstring
Source branch
target_project object
Target Repository
idstring
full_namestring
human_namestring
pathstring
source_project object
Source Repository
idstring
full_namestring
human_namestringrequired
pathstringrequired
[
{
"sha": "string",
"filename": "string",
"status": "string",
"additions": "string",
"deletions": "string",
"blob_url": "string",
"raw_url": "string",
"patch": {
"diff": "string",
"new_path": "string",
"old_path": "string",
"a_mode": "string",
"b_mode": "string",
"new_file": 0,
"renamed_file": 0,
"deleted_file": 0,
"too_large": 0,
"added_lines": 0,
"removed_lines": 0
},
"target_branch": "string",
"source_branch": "string",
"target_project": {
"id": "string",
"full_name": "string",
"human_name": "string",
"path": "string"
},
"source_project": {
"id": "string",
"full_name": "string",
"human_name": "string",
"path": "string"
}
}
]
Successful Example
{
"sha": "45e1211262a0ed24eeb85ac37f7776259ef0e7e1",
"filename": "README.md",
"status": null,
"additions": "3",
"deletions": "1",
"blob_url": "https://ra w.gitcode.com/zzero/demo/blob/45e1211262a0ed24eeb85ac37f7776259ef0e7e1/README.md",
"raw_url": "https://ra w.gitcode.com/zzero/demo/raw/45e1211262a0ed24eeb85ac37f7776259ef0e7e1/README.md",
"patch": {
"diff": "@@ -13,4 +13,6 @@ demo\n \n > covid_19 A simulation animation of an infectious population outbreak\n \n-> leetcode Algorithm solutions\n\\ No newline at end of file\n>+> leetcode Algorithm solutions\n+\n>+> juc package test\n\\ No newline at end of file",
"new_path": "README.md",
"old_path": "README.md",
"a_mode": "100644",
"b_mode": "100644",
"new_file": false,
"renamed_file": false,
"deleted_file": false,
"too_large": false
}
}
Successful Example
{
"sha": "45e1211262a0ed24eeb85ac37f7776259ef0e7e1",
"filename": "src/main/java/com/zhzh/sc/demo/juc/lock/VolatileDemo.java",
"status": null,
"additions": "3",
"deletions": "0",
"blob_url": "https://ra w.gitcode.com/zzero/demo/blob/45e1211262a0ed24eeb85ac37f7776259ef0e7e1/src/main/java/com/zhzh/sc/demo/juc/lock/VolatileDemo.java",
"raw_url": "https://ra w.gitcode.com/zzero/demo/raw/45e1211262a0ed24eeb85ac37f7776259ef0e7e1/src/main/java/com/zhzh/sc/demo/juc/lock/VolatileDemo.java",
"patch": {
"diff": "@@ -15,6 +15,9 @@ public class VolatileDemo {\n System.out.println(\"service end\");\n }\n\n+ /**\n+ * Test method entry\n+ */\n public static void main(String[] args) throws InterruptedException {\n VolatileDemo v = new VolatileDemo();\n new Thread(v::service, \"thread-1\").start();",
"new_path": "src/main/java/com/zhzh/sc/demo/juc/lock/VolatileDemo.java",
"old_path": "src/main/java/com/zhzh/sc/demo/juc/lock/VolatileDemo.java",
"a_mode": "100644",
"b_mode": "100644",
"new_file": false,
"renamed_file": false,
"deleted_file": false,
"too_large": false
}
}