summaryrefslogtreecommitdiffstats
path: root/models/helper_environment.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2020-02-03 16:47:04 +0800
committerGitHub <noreply@github.com>2020-02-03 09:47:04 +0100
commit48ce135cc9d54d1c5cf876411453414a53183968 (patch)
treee87064c6693e135d4732ba8c8289a267e560d985 /models/helper_environment.go
parente959d1a48baf6a59943949e0d6840e1512cd8934 (diff)
downloadgitea-48ce135cc9d54d1c5cf876411453414a53183968.tar.gz
gitea-48ce135cc9d54d1c5cf876411453414a53183968.zip
Move PushUpdateAddDeleteTags to repository module from models (#10106)
* Move PushUpdateAddDeleteTags to repository module from models * Fix deadlock on sqlite
Diffstat (limited to 'models/helper_environment.go')
-rw-r--r--models/helper_environment.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/models/helper_environment.go b/models/helper_environment.go
index 112df96823..bc9d4c8fce 100644
--- a/models/helper_environment.go
+++ b/models/helper_environment.go
@@ -10,6 +10,19 @@ import (
"strings"
)
+// env keys for git hooks need
+const (
+ EnvRepoName = "GITEA_REPO_NAME"
+ EnvRepoUsername = "GITEA_REPO_USER_NAME"
+ EnvRepoIsWiki = "GITEA_REPO_IS_WIKI"
+ EnvPusherName = "GITEA_PUSHER_NAME"
+ EnvPusherEmail = "GITEA_PUSHER_EMAIL"
+ EnvPusherID = "GITEA_PUSHER_ID"
+ EnvKeyID = "GITEA_KEY_ID"
+ EnvIsDeployKey = "GITEA_IS_DEPLOY_KEY"
+ EnvIsInternal = "GITEA_INTERNAL_PUSH"
+)
+
// InternalPushingEnvironment returns an os environment to switch off hooks on push
// 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