aboutsummaryrefslogtreecommitdiffstats
path: root/models/repo.go
diff options
context:
space:
mode:
authorttys3 <41882455+ttys3@users.noreply.github.com>2022-06-03 11:45:54 +0800
committerGitHub <noreply@github.com>2022-06-02 23:45:54 -0400
commit0c759fd4dee1c2a82ecdb0a6019d8ee78dae2209 (patch)
tree54ceb9a1bf1e750188f8cce9380e0f6a7898217e /models/repo.go
parent808a7803098bd86c83185cb823c5b0e2a5b2c56d (diff)
downloadgitea-0c759fd4dee1c2a82ecdb0a6019d8ee78dae2209.tar.gz
gitea-0c759fd4dee1c2a82ecdb0a6019d8ee78dae2209.zip
feat: add DEFAULT_MERGE_STYLE to `repository.pull-request` section for repo init (#19751)
Diffstat (limited to 'models/repo.go')
-rw-r--r--models/repo.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/models/repo.go b/models/repo.go
index d2ad560948..bf70295275 100644
--- a/models/repo.go
+++ b/models/repo.go
@@ -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{