Move createrepository from module to service layer (#26927)

Repository creation depends on many models, so moving it to service
layer is better.
This commit is contained in:
Lunny Xiao 2023-09-06 20:08:51 +08:00 committed by GitHub
parent b3d88ada01
commit b9df9fa2e2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
26 changed files with 510 additions and 482 deletions

View file

@ -108,12 +108,7 @@ done
}
// CreateDelegateHooks creates all the hooks scripts for the repo
func CreateDelegateHooks(repoPath string) error {
return createDelegateHooks(repoPath)
}
// createDelegateHooks creates all the hooks scripts for the repo
func createDelegateHooks(repoPath string) (err error) {
func CreateDelegateHooks(repoPath string) (err error) {
hookNames, hookTpls, giteaHookTpls := getHookTemplates()
hookDir := filepath.Join(repoPath, "hooks")