mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-26 12:27:06 +00:00 
			
		
		
		
	Move repofiles from modules/repofiles to services/repository/files (#17774)
* Move repofiles from modules to services * rename services/repository/repofiles -> services/repository/files * Fix test Co-authored-by: 6543 <6543@obermui.de>
This commit is contained in:
		| @@ -6,12 +6,12 @@ package integrations | ||||
|  | ||||
| import ( | ||||
| 	"code.gitea.io/gitea/models" | ||||
| 	"code.gitea.io/gitea/modules/repofiles" | ||||
| 	api "code.gitea.io/gitea/modules/structs" | ||||
| 	files_service "code.gitea.io/gitea/services/repository/files" | ||||
| ) | ||||
|  | ||||
| func createFileInBranch(user *models.User, repo *models.Repository, treePath, branchName, content string) (*api.FileResponse, error) { | ||||
| 	opts := &repofiles.UpdateRepoFileOptions{ | ||||
| 	opts := &files_service.UpdateRepoFileOptions{ | ||||
| 		OldBranch: branchName, | ||||
| 		TreePath:  treePath, | ||||
| 		Content:   content, | ||||
| @@ -19,7 +19,7 @@ func createFileInBranch(user *models.User, repo *models.Repository, treePath, br | ||||
| 		Author:    nil, | ||||
| 		Committer: nil, | ||||
| 	} | ||||
| 	return repofiles.CreateOrUpdateRepoFile(repo, user, opts) | ||||
| 	return files_service.CreateOrUpdateRepoFile(repo, user, opts) | ||||
| } | ||||
|  | ||||
| func createFile(user *models.User, repo *models.Repository, treePath string) (*api.FileResponse, error) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Lunny Xiao
					Lunny Xiao