Get changed files for a pull request
GET
/repos/{owner}/{repo}/pulls/{index}/files
const url = 'https://gitea.com/api/v1/repos/example/example/pulls/1/files?whitespace=ignore-all';const options = {method: 'GET', headers: {Authorization: 'Basic <credentials>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://gitea.com/api/v1/repos/example/example/pulls/1/files?whitespace=ignore-all' \ --header 'Authorization: Basic <credentials>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”owner
required
string
Owner of the repo
repo
required
string
Name of the repo
index
required
integer format: int64
Index of the pull request to get
Query Parameters
Section titled “Query Parameters”skip-to
string
Skip to given file
whitespace
string
Whitespace behavior
page
integer
Page number of results to return (1-based)
limit
integer
Page size of results
Responses
Section titled “Responses”ChangedFileList
Media typeapplication/json
Array<object>
ChangedFile store information about files affected by the pull request
object
additions
The number of lines added to the file
integer format: int64
changes
The total number of changes to the file
integer format: int64
contents_url
The API URL to get the file contents
string format: uri
deletions
The number of lines deleted from the file
integer format: int64
filename
The name of the changed file
string
html_url
The HTML URL to view the file changes
string format: uri
previous_filename
The previous filename if the file was renamed
string
raw_url
The raw URL to download the file
string format: uri
status
The status of the file change (added, modified, deleted, etc.)
string
Examplegenerated
[ { "additions": 1, "changes": 1, "contents_url": "https://example.com", "deletions": 1, "filename": "example", "html_url": "https://example.com", "previous_filename": "example", "raw_url": "https://example.com", "status": "example" }]Headers
Section titled “Headers”X-HasMore
boolean
True if there is another page
X-Page
integer format: int64
The current page
X-PageCount
integer format: int64
Total number of pages
X-PerPage
integer format: int64
Files per page
X-Total-Count
integer format: int64
Total file count
APINotFound is a not found empty response