summaryrefslogtreecommitdiffstats
path: root/models/repo/repo_unit.go
diff options
context:
space:
mode:
authorJimmy Praet <jimmy.praet@telenet.be>2022-03-04 09:30:49 +0100
committerGitHub <noreply@github.com>2022-03-04 03:30:49 -0500
commit5184c83f6b702aeec3ea85263e16ccf5ebe89836 (patch)
treed5a5f04630815a7342c6e26409faeac75620573b /models/repo/repo_unit.go
parent3c7201682cde10ed551476e13e9e1bfdd971e0c0 (diff)
downloadgitea-5184c83f6b702aeec3ea85263e16ccf5ebe89836.tar.gz
gitea-5184c83f6b702aeec3ea85263e16ccf5ebe89836.zip
Add config option to disable "Update branch by rebase" (#18745)
Diffstat (limited to 'models/repo/repo_unit.go')
-rw-r--r--models/repo/repo_unit.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/models/repo/repo_unit.go b/models/repo/repo_unit.go
index f526cbdf8b..37f1c70545 100644
--- a/models/repo/repo_unit.go
+++ b/models/repo/repo_unit.go
@@ -115,12 +115,15 @@ type PullRequestsConfig struct {
AllowSquash bool
AllowManualMerge bool
AutodetectManualMerge bool
+ AllowRebaseUpdate bool
DefaultDeleteBranchAfterMerge bool
DefaultMergeStyle MergeStyle
}
// FromDB fills up a PullRequestsConfig from serialized format.
func (cfg *PullRequestsConfig) FromDB(bs []byte) error {
+ // AllowRebaseUpdate = true as default for existing PullRequestConfig in DB
+ cfg.AllowRebaseUpdate = true
return json.UnmarshalHandleDoubleEncode(bs, &cfg)
}