diff options
Diffstat (limited to 'integrations/api_repo_file_helpers.go')
-rw-r--r-- | integrations/api_repo_file_helpers.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/integrations/api_repo_file_helpers.go b/integrations/api_repo_file_helpers.go index ef3b8c610b..8477d65a3e 100644 --- a/integrations/api_repo_file_helpers.go +++ b/integrations/api_repo_file_helpers.go @@ -6,11 +6,12 @@ package integrations import ( "code.gitea.io/gitea/models" + 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 *models.User, repo *models.Repository, treePath, branchName, content string) (*api.FileResponse, error) { +func createFileInBranch(user *user_model.User, repo *models.Repository, treePath, branchName, content string) (*api.FileResponse, error) { opts := &files_service.UpdateRepoFileOptions{ OldBranch: branchName, TreePath: treePath, @@ -22,6 +23,6 @@ func createFileInBranch(user *models.User, repo *models.Repository, treePath, br return files_service.CreateOrUpdateRepoFile(repo, user, opts) } -func createFile(user *models.User, repo *models.Repository, treePath string) (*api.FileResponse, error) { +func createFile(user *user_model.User, repo *models.Repository, treePath string) (*api.FileResponse, error) { return createFileInBranch(user, repo, treePath, repo.DefaultBranch, "This is a NEW file") } |