diff options
Diffstat (limited to 'models/helper_environment.go')
-rw-r--r-- | models/helper_environment.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/models/helper_environment.go b/models/helper_environment.go index 3e98f60ffd..57ec3ea1e9 100644 --- a/models/helper_environment.go +++ b/models/helper_environment.go @@ -9,6 +9,7 @@ import ( "os" "strings" + repo_model "code.gitea.io/gitea/models/repo" user_model "code.gitea.io/gitea/models/user" "code.gitea.io/gitea/modules/setting" ) @@ -33,19 +34,19 @@ const ( // It is recommended to avoid using this unless you are pushing within a transaction // or if you absolutely are sure that post-receive and pre-receive will do nothing // We provide the full pushing-environment for other hook providers -func InternalPushingEnvironment(doer *user_model.User, repo *Repository) []string { +func InternalPushingEnvironment(doer *user_model.User, repo *repo_model.Repository) []string { return append(PushingEnvironment(doer, repo), EnvIsInternal+"=true", ) } // PushingEnvironment returns an os environment to allow hooks to work on push -func PushingEnvironment(doer *user_model.User, repo *Repository) []string { +func PushingEnvironment(doer *user_model.User, repo *repo_model.Repository) []string { return FullPushingEnvironment(doer, doer, repo, repo.Name, 0) } // FullPushingEnvironment returns an os environment to allow hooks to work on push -func FullPushingEnvironment(author, committer *user_model.User, repo *Repository, repoName string, prID int64) []string { +func FullPushingEnvironment(author, committer *user_model.User, repo *repo_model.Repository, repoName string, prID int64) []string { isWiki := "false" if strings.HasSuffix(repoName, ".wiki") { isWiki = "true" |