From f096e69e0a1847d8d651dc24ffdd3366e30e0b23 Mon Sep 17 00:00:00 2001 From: Lauris BH Date: Thu, 5 Jul 2018 17:12:09 +0300 Subject: [PATCH] Add default merge options when adding new repository (#4369) (#4373) --- models/repo.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/models/repo.go b/models/repo.go index d1cc290c44dfa..b126c7e3bbb54 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,