mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 10:56:10 +01:00 
			
		
		
		
	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:
		| @@ -16,6 +16,7 @@ import ( | ||||
| 	"code.gitea.io/gitea/modules/repository" | ||||
| 	mirror_service "code.gitea.io/gitea/services/mirror" | ||||
| 	release_service "code.gitea.io/gitea/services/release" | ||||
| 	repo_service "code.gitea.io/gitea/services/repository" | ||||
| 	"code.gitea.io/gitea/tests" | ||||
|  | ||||
| 	"github.com/stretchr/testify/assert" | ||||
| @@ -38,7 +39,7 @@ func TestMirrorPull(t *testing.T) { | ||||
| 		Releases:    false, | ||||
| 	} | ||||
|  | ||||
| 	mirrorRepo, err := repository.CreateRepository(user, user, repository.CreateRepoOptions{ | ||||
| 	mirrorRepo, err := repo_service.CreateRepositoryDirectly(user, user, repo_service.CreateRepoOptions{ | ||||
| 		Name:        opts.RepoName, | ||||
| 		Description: opts.Description, | ||||
| 		IsPrivate:   opts.Private, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user