summaryrefslogtreecommitdiff
path: root/hooks/post-receive
diff options
context:
space:
mode:
authorDrew Blessing <drew.blessing@me.com>2014-10-29 22:21:10 -0500
committerDrew Blessing <drew.blessing@me.com>2014-11-05 15:16:43 -0600
commit3ef7cdf9f94035da5640a585b8c49b0693af2090 (patch)
tree5ad3dbaa118504d185071a5f4e36f8a8cbc3e3dd /hooks/post-receive
parent00b3d2cb7095af3859734c88a7797182e598f047 (diff)
downloadgitlab-shell-3ef7cdf9f94035da5640a585b8c49b0693af2090.tar.gz
Support for custom hooks
Diffstat (limited to 'hooks/post-receive')
-rwxr-xr-xhooks/post-receive7
1 files changed, 4 insertions, 3 deletions
diff --git a/hooks/post-receive b/hooks/post-receive
index d85ad42..301f639 100755
--- a/hooks/post-receive
+++ b/hooks/post-receive
@@ -2,15 +2,16 @@
# This file was placed here by GitLab. It makes sure that your pushed commits
# will be processed properly.
-# You can add your own hooks to this file, but be careful when updating gitlab-shell!
-changes = ARGF.read
+refs = ARGF.read
key_id = ENV['GL_ID']
repo_path = Dir.pwd
+require_relative '../lib/gitlab_custom_hook'
require_relative '../lib/gitlab_post_receive'
-if GitlabPostReceive.new(repo_path, key_id, changes).exec
+if GitlabPostReceive.new(repo_path, key_id, refs).exec &&
+ GitlabCustomHook.new.post_receive(refs, repo_path)
exit 0
else
exit 1