aboutsummaryrefslogtreecommitdiffstats
path: root/integrations/api_repo_file_helpers.go
diff options
context:
space:
mode:
Diffstat (limited to 'integrations/api_repo_file_helpers.go')
-rw-r--r--integrations/api_repo_file_helpers.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/integrations/api_repo_file_helpers.go b/integrations/api_repo_file_helpers.go
index 8477d65a3e..53f74df245 100644
--- a/integrations/api_repo_file_helpers.go
+++ b/integrations/api_repo_file_helpers.go
@@ -5,13 +5,13 @@
package integrations
import (
- "code.gitea.io/gitea/models"
+ repo_model "code.gitea.io/gitea/models/repo"
user_model "code.gitea.io/gitea/models/user"
api "code.gitea.io/gitea/modules/structs"
files_service "code.gitea.io/gitea/services/repository/files"
)
-func createFileInBranch(user *user_model.User, repo *models.Repository, treePath, branchName, content string) (*api.FileResponse, error) {
+func createFileInBranch(user *user_model.User, repo *repo_model.Repository, treePath, branchName, content string) (*api.FileResponse, error) {
opts := &files_service.UpdateRepoFileOptions{
OldBranch: branchName,
TreePath: treePath,
@@ -23,6 +23,6 @@ func createFileInBranch(user *user_model.User, repo *models.Repository, treePath
return files_service.CreateOrUpdateRepoFile(repo, user, opts)
}
-func createFile(user *user_model.User, repo *models.Repository, treePath string) (*api.FileResponse, error) {
+func createFile(user *user_model.User, repo *repo_model.Repository, treePath string) (*api.FileResponse, error) {
return createFileInBranch(user, repo, treePath, repo.DefaultBranch, "This is a NEW file")
}