Add default merge options when adding new repository (#4369)
This commit is contained in:
parent
07063e3e11
commit
54fedd4070
1 changed files with 6 additions and 0 deletions
|
@ -1347,6 +1347,12 @@ func createRepository(e *xorm.Session, doer, u *User, repo *Repository) (err err
|
||||||
Type: tp,
|
Type: tp,
|
||||||
Config: &IssuesConfig{EnableTimetracker: setting.Service.DefaultEnableTimetracking, AllowOnlyContributorsToTrackTime: setting.Service.DefaultAllowOnlyContributorsToTrackTime},
|
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 {
|
} else {
|
||||||
units = append(units, RepoUnit{
|
units = append(units, RepoUnit{
|
||||||
RepoID: repo.ID,
|
RepoID: repo.ID,
|
||||||
|
|
Loading…
Reference in a new issue