Browse Source

try to add env for pre-receive hook

tags/v1.22.5.1^2
open_test 3 years ago
parent
commit
6c3f878a7e
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      routers/private/hook.go

+ 5
- 0
routers/private/hook.go View File

@@ -199,6 +199,11 @@ func HookPreReceive(ctx *macaron.Context, opts private.HookOptions) {
env = append(env,
private.GitQuarantinePath+"="+opts.GitQuarantinePath)
}
env = append(env,
models.EnvRepoSize+"="+fmt.Sprint(repo.Size),
models.EnvRepoMaxFileSize+"="+fmt.Sprint(setting.Repository.Upload.FileMaxSize),
models.EnvRepoMaxSize+"="+fmt.Sprint(setting.Repository.RepoMaxSize),
models.EnvPushSizeCheckFlag+"="+fmt.Sprint(setting.Repository.Upload.ShellFlag))

for i := range opts.OldCommitIDs {
oldCommitID := opts.OldCommitIDs[i]


Loading…
Cancel
Save