1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

Add rebase with merge commit merge style (#3844) (#4052)

Signed-off-by: Julian Tölle <julian.toelle97@gmail.com>
This commit is contained in:
Julian
2018-12-27 11:27:08 +01:00
committed by Lauris BH
parent 58bdff53cd
commit 4a685f8b87
14 changed files with 162 additions and 5 deletions

View File

@@ -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
}