mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-08-01 17:38:33 +00:00
Add API to get commit diff/patch (#17095)
* Add API to get commit diff/patch * Add Tests Co-authored-by: 6543 <6543@obermui.de>
This commit is contained in:
parent
d4bb8e0ae7
commit
5ac857f4d4
4 changed files with 128 additions and 0 deletions
|
@ -3581,6 +3581,60 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"/repos/{owner}/{repo}/git/commits/{sha}.{diffType}": {
|
||||
"get": {
|
||||
"produces": [
|
||||
"text/plain"
|
||||
],
|
||||
"tags": [
|
||||
"repository"
|
||||
],
|
||||
"summary": "Get a commit's diff or patch",
|
||||
"operationId": "repoDownloadCommitDiffOrPatch",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "owner of the repo",
|
||||
"name": "owner",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "name of the repo",
|
||||
"name": "repo",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "SHA of the commit to get",
|
||||
"name": "sha",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"enum": [
|
||||
"diff",
|
||||
"patch"
|
||||
],
|
||||
"type": "string",
|
||||
"description": "whether the output is diff or patch",
|
||||
"name": "diffType",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"$ref": "#/responses/string"
|
||||
},
|
||||
"404": {
|
||||
"$ref": "#/responses/notFound"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/repos/{owner}/{repo}/git/notes/{sha}": {
|
||||
"get": {
|
||||
"produces": [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue