mirror of
https://codeberg.org/davrot/forgejo.git
synced 2025-05-20 14:00:04 +02:00
Create a branch directly from commit on the create branch API (#22956)
#### Added - API: Create a branch directly from commit on the create branch API - Added `old_ref_name` parameter to allow creating a new branch from a specific commit, tag, or branch. - Deprecated `old_branch_name` parameter in favor of the new `old_ref_name` parameter. --------- Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
parent
023a048f52
commit
cd9a13ebb4
3 changed files with 41 additions and 5 deletions
|
@ -249,10 +249,16 @@ type CreateBranchRepoOption struct {
|
|||
// unique: true
|
||||
BranchName string `json:"new_branch_name" binding:"Required;GitRefName;MaxSize(100)"`
|
||||
|
||||
// Deprecated: true
|
||||
// Name of the old branch to create from
|
||||
//
|
||||
// unique: true
|
||||
OldBranchName string `json:"old_branch_name" binding:"GitRefName;MaxSize(100)"`
|
||||
|
||||
// Name of the old branch/tag/commit to create from
|
||||
//
|
||||
// unique: true
|
||||
OldRefName string `json:"old_ref_name" binding:"GitRefName;MaxSize(100)"`
|
||||
}
|
||||
|
||||
// TransferRepoOption options when transfer a repository's ownership
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue