Skip to content

Commit

Permalink
Add default merge options when adding new repository (#4369) (#4373)
Browse files Browse the repository at this point in the history
  • Loading branch information
lafriks authored and jonasfranz committed Jul 5, 2018
1 parent 768b41a commit f096e69
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions models/repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit f096e69

Please sign in to comment.