feat: add DEFAULT_MERGE_STYLE to repository.pull-request section for repo init (#19751)

This commit is contained in:
ttys3 authored and GitHub committed 2022-06-02 23:45:54 -04:00
1 parent 808a780309
commit 0c759fd4de
6 files changed
+15 -1

No files matched your search

+1 -1
View File
@@ -373,7 +373,7 @@ func CreateRepository(ctx context.Context, doer, u *user_model.User, repo *repo_
units = append(units, repo_model.RepoUnit{
RepoID: repo.ID,
Type: tp,
Config: &repo_model.PullRequestsConfig{AllowMerge: true, AllowRebase: true, AllowRebaseMerge: true, AllowSquash: true, DefaultMergeStyle: repo_model.MergeStyleMerge, AllowRebaseUpdate: true},
Config: &repo_model.PullRequestsConfig{AllowMerge: true, AllowRebase: true, AllowRebaseMerge: true, AllowSquash: true, DefaultMergeStyle: repo_model.MergeStyle(setting.Repository.PullRequest.DefaultMergeStyle), AllowRebaseUpdate: true},
})
} else {
units = append(units, repo_model.RepoUnit{