From 5184c83f6b702aeec3ea85263e16ccf5ebe89836 Mon Sep 17 00:00:00 2001 From: Jimmy Praet Date: Fri, 4 Mar 2022 09:30:49 +0100 Subject: Add config option to disable "Update branch by rebase" (#18745) --- routers/api/v1/repo/repo.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'routers/api/v1/repo/repo.go') diff --git a/routers/api/v1/repo/repo.go b/routers/api/v1/repo/repo.go index 7a7fe218e8..560139c457 100644 --- a/routers/api/v1/repo/repo.go +++ b/routers/api/v1/repo/repo.go @@ -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 } -- cgit v1.2.3