diff options
Diffstat (limited to 'hooks/pre-receive')
-rwxr-xr-x | hooks/pre-receive | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/hooks/pre-receive b/hooks/pre-receive index 1f8a9d5..6ed9a2c 100755 --- a/hooks/pre-receive +++ b/hooks/pre-receive @@ -5,12 +5,15 @@ refs = $stdin.read key_id = ENV['GL_ID'] +protocol = ENV['PROTOCOL'] repo_path = Dir.pwd require_relative '../lib/gitlab_custom_hook' require_relative '../lib/gitlab_access' -if GitlabAccess.new(repo_path, key_id, refs).exec && +protocol ||= 'http' + +if GitlabAccess.new(repo_path, key_id, refs, protocol).exec && GitlabCustomHook.new.pre_receive(refs, repo_path) exit 0 else |