Add IsTemplate option in create repo ui and api (#12942)
Signed-off-by: a1012112796 <1012112796@qq.com> Co-authored-by: Lauris BH <lauris@nix.lv>
This commit is contained in:
parent
7a7f56044a
commit
3c360801b3
9 changed files with 20 additions and 0 deletions
|
@ -38,6 +38,7 @@ type CreateRepoForm struct {
|
|||
IssueLabels string
|
||||
License string
|
||||
Readme string
|
||||
Template bool
|
||||
|
||||
RepoTemplate int64
|
||||
GitContent bool
|
||||
|
|
|
@ -40,6 +40,7 @@ func CreateRepository(doer, u *models.User, opts models.CreateRepoOptions) (*mod
|
|||
OriginalServiceType: opts.GitServiceType,
|
||||
IsPrivate: opts.IsPrivate,
|
||||
IsFsckEnabled: !opts.IsMirror,
|
||||
IsTemplate: opts.IsTemplate,
|
||||
CloseIssuesViaCommitInAnyBranch: setting.Repository.DefaultCloseIssuesViaCommitsInAnyBranch,
|
||||
Status: opts.Status,
|
||||
IsEmpty: !opts.AutoInit,
|
||||
|
|
|
@ -109,6 +109,8 @@ type CreateRepoOption struct {
|
|||
IssueLabels string `json:"issue_labels"`
|
||||
// Whether the repository should be auto-intialized?
|
||||
AutoInit bool `json:"auto_init"`
|
||||
// Whether the repository is template
|
||||
Template bool `json:"template"`
|
||||
// Gitignores to use
|
||||
Gitignores string `json:"gitignores"`
|
||||
// License to use
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue