diff options
Diffstat (limited to 'hooks/post-receive')
-rwxr-xr-x | hooks/post-receive | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/hooks/post-receive b/hooks/post-receive new file mode 100755 index 0000000..d85ad42 --- /dev/null +++ b/hooks/post-receive @@ -0,0 +1,17 @@ +#!/usr/bin/env ruby + +# 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 +key_id = ENV['GL_ID'] +repo_path = Dir.pwd + +require_relative '../lib/gitlab_post_receive' + +if GitlabPostReceive.new(repo_path, key_id, changes).exec + exit 0 +else + exit 1 +end |