summaryrefslogtreecommitdiffstats
path: root/modules/repository/generate.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2022-08-25 10:31:57 +0800
committerGitHub <noreply@github.com>2022-08-25 10:31:57 +0800
commit1d8543e7db58d7c4973758e47f005c4d8bd7d7a3 (patch)
treeb60c99e2dfd69ccb998f8a0829d98d7cadcf0d6b /modules/repository/generate.go
parent4a4bfafa238bf48851f8c11fa3701bd42b912475 (diff)
downloadgitea-1d8543e7db58d7c4973758e47f005c4d8bd7d7a3.tar.gz
gitea-1d8543e7db58d7c4973758e47f005c4d8bd7d7a3.zip
Move some files into models' sub packages (#20262)
* Move some files into models' sub packages * Move functions * merge main branch * Fix check * fix check * Fix some tests * Fix lint * Fix lint * Revert lint changes * Fix error comments * Fix lint Co-authored-by: 6543 <6543@obermui.de>
Diffstat (limited to 'modules/repository/generate.go')
-rw-r--r--modules/repository/generate.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/modules/repository/generate.go b/modules/repository/generate.go
index 8f7b4c885d..4d76d33993 100644
--- a/modules/repository/generate.go
+++ b/modules/repository/generate.go
@@ -15,7 +15,6 @@ import (
"strings"
"time"
- "code.gitea.io/gitea/models"
git_model "code.gitea.io/gitea/models/git"
repo_model "code.gitea.io/gitea/models/repo"
user_model "code.gitea.io/gitea/models/user"
@@ -321,7 +320,7 @@ func GenerateRepository(ctx context.Context, doer, owner *user_model.User, templ
TrustModel: templateRepo.TrustModel,
}
- if err = models.CreateRepository(ctx, doer, owner, generateRepo, false); err != nil {
+ if err = CreateRepositoryByExample(ctx, doer, owner, generateRepo, false); err != nil {
return nil, err
}