跳转到内容
Try Gitea Cloud ☁️ for 30 days → Accelerate your Development & Deploys!
Support
This is the documentation of 22.6.1, which is no longer the latest release. See the latest release.

Get a pull request diff or patch

GET
/repos/{owner}/{repo}/pulls/{index}.{diffType}
curl --request GET \
--url https://gitea.example.com/api/v1/repos/example/example/pulls/1.diff \
--header 'Authorization: Basic <credentials>'
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

diffType
required
string
Allowed values: diff patch

Whether the output is diff or patch

binary
boolean

Whether to include binary file changes. if true, the diff is applicable with git apply

APIString is a string response

Media typetext/plain
string

APINotFound is a not found empty response

Media typetext/plain