Support copy protected branch from template repository (#25889)

Fix #14303
This commit is contained in:
Lunny Xiao authored and GitHub committed 2023-07-21 12:32:47 +08:00
1 parent 2b6f224336
commit 037c9895a7
8 files changed
+86 -38

No files matched your search

+11 -10
View File
@@ -355,16 +355,17 @@ func Generate(ctx *context.APIContext) {
}
opts := repo_module.GenerateRepoOptions{
Name: form.Name,
DefaultBranch: form.DefaultBranch,
Description: form.Description,
Private: form.Private,
GitContent: form.GitContent,
Topics: form.Topics,
GitHooks: form.GitHooks,
Webhooks: form.Webhooks,
Avatar: form.Avatar,
IssueLabels: form.Labels,
Name: form.Name,
DefaultBranch: form.DefaultBranch,
Description: form.Description,
Private: form.Private,
GitContent: form.GitContent,
Topics: form.Topics,
GitHooks: form.GitHooks,
Webhooks: form.Webhooks,
Avatar: form.Avatar,
IssueLabels: form.Labels,
ProtectedBranch: form.ProtectedBranch,
}
if !opts.IsValid() {