mirror of
https://github.com/go-gitea/gitea
synced 2025-07-23 10:48:37 +00:00
Support copy protected branch from template repository (#25889)
Fix #14303
This commit is contained in:
@@ -241,15 +241,16 @@ func CreatePost(ctx *context.Context) {
|
||||
var err error
|
||||
if form.RepoTemplate > 0 {
|
||||
opts := repo_module.GenerateRepoOptions{
|
||||
Name: form.RepoName,
|
||||
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.RepoName,
|
||||
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() {
|
||||
|
Reference in New Issue
Block a user