aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/auth/repo_form.go1
-rw-r--r--modules/repository/create.go1
-rw-r--r--modules/structs/repo.go2
3 files changed, 4 insertions, 0 deletions
diff --git a/modules/auth/repo_form.go b/modules/auth/repo_form.go
index e8809136c9..039b0cb583 100644
--- a/modules/auth/repo_form.go
+++ b/modules/auth/repo_form.go
@@ -38,6 +38,7 @@ type CreateRepoForm struct {
IssueLabels string
License string
Readme string
+ Template bool
RepoTemplate int64
GitContent bool
diff --git a/modules/repository/create.go b/modules/repository/create.go
index e6a3e7081d..1408637815 100644
--- a/modules/repository/create.go
+++ b/modules/repository/create.go
@@ -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,
diff --git a/modules/structs/repo.go b/modules/structs/repo.go
index c86b19dfd0..a8ca823ef6 100644
--- a/modules/structs/repo.go
+++ b/modules/structs/repo.go
@@ -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