List pull requests files
Lists the files in a specified pull request.
[!NOTE] Responses include a maximum of 3000 files. The paginated response returns 30 files per page by default.
This endpoint supports the following custom media types. For more information, see “Media types.”
application/vnd.github.raw+json: Returns the raw markdown body. Response will includebody. This is the default if you do not pass any specific media type.application/vnd.github.text+json: Returns a text only representation of the markdown body. Response will includebody_text.application/vnd.github.html+json: Returns HTML rendered from the body’s markdown. Response will includebody_html.application/vnd.github.full+json: Returns raw, text, and HTML representations. Response will includebody,body_text, andbody_html.
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”The account owner of the repository. The name is not case sensitive.
The name of the repository without the .git extension. The name is not case sensitive.
The number that identifies the pull request.
Query Parameters
Section titled “ Query Parameters ”The number of results per page (max 100). For more information, see “Using pagination in the REST API.”
The page number of the results to fetch. For more information, see “Using pagination in the REST API.”
Responses
Section titled “ Responses ”Response
Diff Entry
object
Examples
[ { "sha": "bbcd538c8e72b8c175046e27cc8f907076331401", "filename": "file1.txt", "status": "added", "additions": 103, "deletions": 21, "changes": 124, "blob_url": "https://github.com/octocat/Hello-World/blob/6dcb09b5b57875f334f61aebed695e2e4193db5e/file1.txt", "raw_url": "https://github.com/octocat/Hello-World/raw/6dcb09b5b57875f334f61aebed695e2e4193db5e/file1.txt", "contents_url": "https://api.github.com/repos/octocat/Hello-World/contents/file1.txt?ref=6dcb09b5b57875f334f61aebed695e2e4193db5e", "patch": "@@ -132,7 +132,7 @@ module Test @@ -1000,7 +1000,7 @@ module Test" }]Headers
Section titled “ Headers ”Example
<https://api.github.com/resource?page=2>; rel="next", <https://api.github.com/resource?page=5>; rel="last"Validation failed, or the endpoint has been spammed.
Validation Error
object
object
Example generated
{ "message": "example", "documentation_url": "example", "errors": [ { "resource": "example", "field": "example", "message": "example", "code": "example", "index": 1, "value": [ "example" ] } ]}Internal Error
Basic Error
object
Example generated
{ "message": "example", "documentation_url": "example", "url": "example", "status": "example"}Service unavailable
object
Example generated
{ "code": "example", "message": "example", "documentation_url": "example"}