diff options
author | Nick Thomas <nick@gitlab.com> | 2018-08-14 00:22:46 +0100 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2018-08-14 00:22:46 +0100 |
commit | c8bf2e7d47c3b8f34cb79847edcd5dd50b8f280e (patch) | |
tree | cc22dc6c91f58ccaadd97fdd816159de6ec8a135 /hooks | |
parent | 764f6f47fa6a8698ae033532ae49875a87030518 (diff) | |
download | gitlab-shell-c8bf2e7d47c3b8f34cb79847edcd5dd50b8f280e.tar.gz |
Revert "Merge branch 'ash.mckenzie/srp-refactor' into 'master'"
This reverts commit 3aaf4751e09262c53544a1987f59b1308af9b6c1, reversing
changes made to c6577e0d75f51b017f2f332838b97c3ca5b497c0.
Diffstat (limited to 'hooks')
-rwxr-xr-x | hooks/post-receive | 6 | ||||
-rwxr-xr-x | hooks/pre-receive | 6 | ||||
-rwxr-xr-x | hooks/update | 4 |
3 files changed, 8 insertions, 8 deletions
diff --git a/hooks/post-receive b/hooks/post-receive index 33d9f8d..30f4be1 100755 --- a/hooks/post-receive +++ b/hooks/post-receive @@ -4,15 +4,15 @@ # will be processed properly. refs = $stdin.read -gl_id = ENV.delete('GL_ID') +key_id = ENV.delete('GL_ID') gl_repository = ENV['GL_REPOSITORY'] repo_path = Dir.pwd require_relative '../lib/gitlab_custom_hook' require_relative '../lib/gitlab_post_receive' -if GitlabPostReceive.new(gl_repository, repo_path, gl_id, refs).exec && - GitlabCustomHook.new(repo_path, gl_id).post_receive(refs) +if GitlabPostReceive.new(gl_repository, repo_path, key_id, refs).exec && + GitlabCustomHook.new(repo_path, key_id).post_receive(refs) exit 0 else exit 1 diff --git a/hooks/pre-receive b/hooks/pre-receive index 66c61d9..6ce5879 100755 --- a/hooks/pre-receive +++ b/hooks/pre-receive @@ -4,7 +4,7 @@ # will be processed properly. refs = $stdin.read -gl_id = ENV.delete('GL_ID') +key_id = ENV.delete('GL_ID') protocol = ENV.delete('GL_PROTOCOL') repo_path = Dir.pwd gl_repository = ENV['GL_REPOSITORY'] @@ -23,8 +23,8 @@ require_relative '../lib/gitlab_net' # last so that it only runs if everything else succeeded. On post-receive on the # other hand, we run GitlabPostReceive first because the push is already done # and we don't want to skip it if the custom hook fails. -if GitlabAccess.new(gl_repository, repo_path, gl_id, refs, protocol).exec && - GitlabCustomHook.new(repo_path, gl_id).pre_receive(refs) && +if GitlabAccess.new(gl_repository, repo_path, key_id, refs, protocol).exec && + GitlabCustomHook.new(repo_path, key_id).pre_receive(refs) && increase_reference_counter(gl_repository, repo_path) exit 0 else diff --git a/hooks/update b/hooks/update index 263a3e8..4c2fc08 100755 --- a/hooks/update +++ b/hooks/update @@ -7,11 +7,11 @@ ref_name = ARGV[0] old_value = ARGV[1] new_value = ARGV[2] repo_path = Dir.pwd -gl_id = ENV.delete('GL_ID') +key_id = ENV.delete('GL_ID') require_relative '../lib/gitlab_custom_hook' -if GitlabCustomHook.new(repo_path, gl_id).update(ref_name, old_value, new_value) +if GitlabCustomHook.new(repo_path, key_id).update(ref_name, old_value, new_value) exit 0 else exit 1 |