mirror of
https://github.com/go-gitea/gitea
synced 2025-08-08 18:48:21 +00:00
Add config option to disable "Update branch by rebase" (#18745)
This commit is contained in:
@@ -860,6 +860,7 @@ func updateRepoUnits(ctx *context.APIContext, opts api.EditRepoOption) error {
|
||||
AllowSquash: true,
|
||||
AllowManualMerge: true,
|
||||
AutodetectManualMerge: false,
|
||||
AllowRebaseUpdate: true,
|
||||
DefaultDeleteBranchAfterMerge: false,
|
||||
DefaultMergeStyle: repo_model.MergeStyleMerge,
|
||||
}
|
||||
@@ -888,6 +889,9 @@ func updateRepoUnits(ctx *context.APIContext, opts api.EditRepoOption) error {
|
||||
if opts.AutodetectManualMerge != nil {
|
||||
config.AutodetectManualMerge = *opts.AutodetectManualMerge
|
||||
}
|
||||
if opts.AllowRebaseUpdate != nil {
|
||||
config.AllowRebaseUpdate = *opts.AllowRebaseUpdate
|
||||
}
|
||||
if opts.DefaultDeleteBranchAfterMerge != nil {
|
||||
config.DefaultDeleteBranchAfterMerge = *opts.DefaultDeleteBranchAfterMerge
|
||||
}
|
||||
|
@@ -472,6 +472,7 @@ func SettingsPost(ctx *context.Context) {
|
||||
AllowSquash: form.PullsAllowSquash,
|
||||
AllowManualMerge: form.PullsAllowManualMerge,
|
||||
AutodetectManualMerge: form.EnableAutodetectManualMerge,
|
||||
AllowRebaseUpdate: form.PullsAllowRebaseUpdate,
|
||||
DefaultDeleteBranchAfterMerge: form.DefaultDeleteBranchAfterMerge,
|
||||
DefaultMergeStyle: repo_model.MergeStyle(form.PullsDefaultMergeStyle),
|
||||
},
|
||||
|
Reference in New Issue
Block a user