mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 19:06:18 +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,7 +16,6 @@ import ( | ||||
| 	"code.gitea.io/gitea/models/unittest" | ||||
| 	user_model "code.gitea.io/gitea/models/user" | ||||
| 	"code.gitea.io/gitea/modules/git" | ||||
| 	repo_module "code.gitea.io/gitea/modules/repository" | ||||
| 	pull_service "code.gitea.io/gitea/services/pull" | ||||
| 	repo_service "code.gitea.io/gitea/services/repository" | ||||
| 	files_service "code.gitea.io/gitea/services/repository/files" | ||||
| @@ -81,7 +80,7 @@ func TestAPIPullUpdateByRebase(t *testing.T) { | ||||
| } | ||||
|  | ||||
| func createOutdatedPR(t *testing.T, actor, forkOrg *user_model.User) *issues_model.PullRequest { | ||||
| 	baseRepo, err := repo_service.CreateRepository(db.DefaultContext, actor, actor, repo_module.CreateRepoOptions{ | ||||
| 	baseRepo, err := repo_service.CreateRepository(db.DefaultContext, actor, actor, repo_service.CreateRepoOptions{ | ||||
| 		Name:        "repo-pr-update", | ||||
| 		Description: "repo-tmp-pr-update description", | ||||
| 		AutoInit:    true, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user