1
1
mirror of https://github.com/go-gitea/gitea synced 2025-09-18 22:58:14 +00:00

Rename UpdateBranch API to RenameBranch API (#35374)

Discussed in #35368, originally implemented in #32433
This commit is contained in:
Michal Suchánek
2025-09-01 16:12:05 +00:00
committed by GitHub
parent fd7ebaf427
commit ea96ff6b0c
6 changed files with 47 additions and 47 deletions

View File

@@ -6807,8 +6807,8 @@
"tags": [
"repository"
],
"summary": "Update a branch",
"operationId": "repoUpdateBranch",
"summary": "Rename a branch",
"operationId": "repoRenameBranch",
"parameters": [
{
"type": "string",
@@ -6835,7 +6835,7 @@
"name": "body",
"in": "body",
"schema": {
"$ref": "#/definitions/UpdateBranchRepoOption"
"$ref": "#/definitions/RenameBranchRepoOption"
}
}
],
@@ -27163,6 +27163,22 @@
},
"x-go-package": "code.gitea.io/gitea/modules/structs"
},
"RenameBranchRepoOption": {
"description": "RenameBranchRepoOption options when renaming a branch in a repository",
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"description": "New branch name",
"type": "string",
"uniqueItems": true,
"x-go-name": "Name"
}
},
"x-go-package": "code.gitea.io/gitea/modules/structs"
},
"RenameOrgOption": {
"description": "RenameOrgOption options when renaming an organization",
"type": "object",
@@ -28093,22 +28109,6 @@
},
"x-go-package": "code.gitea.io/gitea/modules/structs"
},
"UpdateBranchRepoOption": {
"description": "UpdateBranchRepoOption options when updating a branch in a repository",
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"description": "New branch name",
"type": "string",
"uniqueItems": true,
"x-go-name": "Name"
}
},
"x-go-package": "code.gitea.io/gitea/modules/structs"
},
"UpdateFileOptions": {
"description": "UpdateFileOptions options for updating files\nNote: `author` and `committer` are optional (if only one is given, it will be used for the other, otherwise the authenticated user will be used)",
"type": "object",