Add default merge options when adding new repository (#4369) (#4373)

This commit is contained in:
Lauris BH 2018-07-05 17:12:09 +03:00 committed by Jonas Franz
parent 768b41adba
commit f096e69e0a

View File

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