summaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
authorLauris BH <lauris@nix.lv>2018-07-05 06:02:54 +0300
committerLunny Xiao <xiaolunwen@gmail.com>2018-07-05 11:02:54 +0800
commit54fedd4070be9819a6dd4e441b3c5689334eae9d (patch)
tree0c27de07a2f83cc8169c91a78aa99d6346c141b0 /models
parent07063e3e1179dbb8d6e131d7ea0c1b028a772226 (diff)
downloadgitea-54fedd4070be9819a6dd4e441b3c5689334eae9d.tar.gz
gitea-54fedd4070be9819a6dd4e441b3c5689334eae9d.zip
Add default merge options when adding new repository (#4369)
Diffstat (limited to 'models')
-rw-r--r--models/repo.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/models/repo.go b/models/repo.go
index 52325f2623..c795deee8d 100644
--- a/models/repo.go
+++ b/models/repo.go
@@ -1347,6 +1347,12 @@ func createRepository(e *xorm.Session, doer, u *User, repo *Repository) (err err
Type: tp,
Config: &IssuesConfig{EnableTimetracker: setting.Service.DefaultEnableTimetracking, AllowOnlyContributorsToTrackTime: setting.Service.DefaultAllowOnlyContributorsToTrackTime},
})
+ } else if tp == UnitTypePullRequests {
+ units = append(units, RepoUnit{
+ RepoID: repo.ID,
+ Type: tp,
+ Config: &PullRequestsConfig{AllowMerge: true, AllowRebase: true, AllowSquash: true},
+ })
} else {
units = append(units, RepoUnit{
RepoID: repo.ID,