summaryrefslogtreecommitdiffstats
path: root/models/repo_unit.go
diff options
context:
space:
mode:
authorJulian <julian.toelle97@gmail.com>2018-12-27 11:27:08 +0100
committerLauris BH <lauris@nix.lv>2018-12-27 12:27:08 +0200
commit4a685f8b872a3d4c101c5e8165fa99e696c8fb45 (patch)
tree7ad36ee9bf87cec61ee0967a50037d9331d2ab58 /models/repo_unit.go
parent58bdff53cd98e33791f91584d02887864aabc5c4 (diff)
downloadgitea-4a685f8b872a3d4c101c5e8165fa99e696c8fb45.tar.gz
gitea-4a685f8b872a3d4c101c5e8165fa99e696c8fb45.zip
Add rebase with merge commit merge style (#3844) (#4052)
Signed-off-by: Julian Tölle <julian.toelle97@gmail.com>
Diffstat (limited to 'models/repo_unit.go')
-rw-r--r--models/repo_unit.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/models/repo_unit.go b/models/repo_unit.go
index 9eaec884bb..430f5a242f 100644
--- a/models/repo_unit.go
+++ b/models/repo_unit.go
@@ -91,6 +91,7 @@ type PullRequestsConfig struct {
IgnoreWhitespaceConflicts bool
AllowMerge bool
AllowRebase bool
+ AllowRebaseMerge bool
AllowSquash bool
}
@@ -108,6 +109,7 @@ func (cfg *PullRequestsConfig) ToDB() ([]byte, error) {
func (cfg *PullRequestsConfig) IsMergeStyleAllowed(mergeStyle MergeStyle) bool {
return mergeStyle == MergeStyleMerge && cfg.AllowMerge ||
mergeStyle == MergeStyleRebase && cfg.AllowRebase ||
+ mergeStyle == MergeStyleRebaseMerge && cfg.AllowRebaseMerge ||
mergeStyle == MergeStyleSquash && cfg.AllowSquash
}