diff options
author | Kemal Zebari <60799661+kemzeb@users.noreply.github.com> | 2024-12-11 21:02:35 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-12 05:02:35 +0000 |
commit | 01b1896bf5eacfd7f4f64d9ebb0ad165e3e60a5c (patch) | |
tree | ca50b20d23874de2505c885f4e4f5eff820e816b /modules | |
parent | 1e751d81b321c07f14ad25e034bf87a1e060e5ef (diff) | |
download | gitea-01b1896bf5eacfd7f4f64d9ebb0ad165e3e60a5c.tar.gz gitea-01b1896bf5eacfd7f4f64d9ebb0ad165e3e60a5c.zip |
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>
Diffstat (limited to 'modules')
-rw-r--r-- | modules/structs/repo.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/modules/structs/repo.go b/modules/structs/repo.go index 832ffa8bcc..fb784bd8b3 100644 --- a/modules/structs/repo.go +++ b/modules/structs/repo.go @@ -278,6 +278,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 { |