mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-11 04:05:10 +02:00
Implement update branch API (#32433)
Resolves #22526. Builds upon #23061. --------- Co-authored-by: sillyguodong <33891828+sillyguodong@users.noreply.github.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> (cherry picked from commit 01b1896bf5eacfd7f4f64d9ebb0ad165e3e60a5c) Conflicts: routers/api/v1/api.go context conflict + s/PathParam/Params/ templates/swagger/v1_json.tmpl make generate-swagger
This commit is contained in:
parent
c3d37894aa
commit
b0d6a7f07b
6 changed files with 189 additions and 0 deletions
|
@ -290,6 +290,16 @@ type CreateBranchRepoOption struct {
|
|||
OldRefName string `json:"old_ref_name" binding:"GitRefName;MaxSize(100)"`
|
||||
}
|
||||
|
||||
// UpdateBranchRepoOption options when updating a branch in a repository
|
||||
// swagger:model
|
||||
type UpdateBranchRepoOption struct {
|
||||
// New branch name
|
||||
//
|
||||
// required: true
|
||||
// unique: true
|
||||
Name string `json:"name" binding:"Required;GitRefName;MaxSize(100)"`
|
||||
}
|
||||
|
||||
// TransferRepoOption options when transfer a repository's ownership
|
||||
// swagger:model
|
||||
type TransferRepoOption struct {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue