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:
赵智超 2020-09-25 13:18:37 +08:00 committed by GitHub
parent 7a7f56044a
commit 3c360801b3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 20 additions and 0 deletions

View file

@ -245,6 +245,7 @@ func CreateUserRepo(ctx *context.APIContext, owner *models.User, opt api.CreateR
AutoInit: opt.AutoInit,
DefaultBranch: opt.DefaultBranch,
TrustModel: models.ToTrustModel(opt.TrustModel),
IsTemplate: opt.Template,
})
if err != nil {
if models.IsErrRepoAlreadyExist(err) {