summaryrefslogtreecommitdiff
path: root/lib/gitlab_custom_hook.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab_custom_hook.rb')
-rw-r--r--lib/gitlab_custom_hook.rb13
1 files changed, 5 insertions, 8 deletions
diff --git a/lib/gitlab_custom_hook.rb b/lib/gitlab_custom_hook.rb
index a099e79..ac6837d 100644
--- a/lib/gitlab_custom_hook.rb
+++ b/lib/gitlab_custom_hook.rb
@@ -4,24 +4,21 @@ class GitlabCustomHook
def pre_receive(changes, repo_path)
hook = hook_file('pre-receive', repo_path)
return true if hook.nil?
- if call_receive_hook(hook, changes)
- return true
- else
- # reset GL_ID env since we stop git push here
- ENV['GL_ID'] = nil
- return false
- end
+
+ call_receive_hook(hook, changes)
end
def post_receive(changes, repo_path)
hook = hook_file('post-receive', repo_path)
return true if hook.nil?
- call_receive_hook(hook, changes) ? true : false
+
+ call_receive_hook(hook, changes)
end
def update(ref_name, old_value, new_value, repo_path)
hook = hook_file('update', repo_path)
return true if hook.nil?
+
system(hook, ref_name, old_value, new_value)
end