summaryrefslogtreecommitdiffstats
path: root/models/repo_unit.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/repo_unit.go')
-rw-r--r--models/repo_unit.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/models/repo_unit.go b/models/repo_unit.go
index 3ef3904833..0feddfe2ea 100644
--- a/models/repo_unit.go
+++ b/models/repo_unit.go
@@ -101,6 +101,8 @@ type PullRequestsConfig struct {
AllowRebase bool
AllowRebaseMerge bool
AllowSquash bool
+ AllowManualMerge bool
+ AutodetectManualMerge bool
}
// FromDB fills up a PullRequestsConfig from serialized format.
@@ -120,7 +122,8 @@ func (cfg *PullRequestsConfig) IsMergeStyleAllowed(mergeStyle MergeStyle) bool {
return mergeStyle == MergeStyleMerge && cfg.AllowMerge ||
mergeStyle == MergeStyleRebase && cfg.AllowRebase ||
mergeStyle == MergeStyleRebaseMerge && cfg.AllowRebaseMerge ||
- mergeStyle == MergeStyleSquash && cfg.AllowSquash
+ mergeStyle == MergeStyleSquash && cfg.AllowSquash ||
+ mergeStyle == MergeStyleManuallyMerged && cfg.AllowManualMerge
}
// AllowedMergeStyleCount returns the total count of allowed merge styles for the PullRequestsConfig