summaryrefslogtreecommitdiff
path: root/hooks/post-receive
diff options
context:
space:
mode:
authorAlejandro Rodríguez <alejorro70@gmail.com>2017-04-28 17:10:42 -0300
committerAlejandro Rodríguez <alejorro70@gmail.com>2017-05-11 12:21:31 -0300
commitee259653e7a00359740ca36cef606f9c3cc1a7cb (patch)
tree6f53403454defd386c4455a6a9ffcf052d4c6695 /hooks/post-receive
parent1cf14770f3bf5c3255f4c3a8f69ccfab74317fcd (diff)
downloadgitlab-shell-ee259653e7a00359740ca36cef606f9c3cc1a7cb.tar.gz
Handle GL_REPOSITORY env variable and use it in api calls
Diffstat (limited to 'hooks/post-receive')
-rwxr-xr-xhooks/post-receive3
1 files changed, 2 insertions, 1 deletions
diff --git a/hooks/post-receive b/hooks/post-receive
index 7877306..3504a48 100755
--- a/hooks/post-receive
+++ b/hooks/post-receive
@@ -5,12 +5,13 @@
refs = $stdin.read
key_id = ENV.delete('GL_ID')
+gl_repository = ENV.delete('GL_REPOSITORY')
repo_path = Dir.pwd
require_relative '../lib/gitlab_custom_hook'
require_relative '../lib/gitlab_post_receive'
-if GitlabPostReceive.new(repo_path, key_id, refs).exec &&
+if GitlabPostReceive.new(gl_repository, repo_path, key_id, refs).exec &&
GitlabCustomHook.new(repo_path, key_id).post_receive(refs)
exit 0
else