Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'ruby/vendor/gitlab-shell/hooks/update')
-rwxr-xr-xruby/vendor/gitlab-shell/hooks/update18
1 files changed, 18 insertions, 0 deletions
diff --git a/ruby/vendor/gitlab-shell/hooks/update b/ruby/vendor/gitlab-shell/hooks/update
new file mode 100755
index 000000000..4c2fc08b0
--- /dev/null
+++ b/ruby/vendor/gitlab-shell/hooks/update
@@ -0,0 +1,18 @@
+#!/usr/bin/env ruby
+
+# This file was placed here by GitLab. It makes sure that your pushed commits
+# will be processed properly.
+
+ref_name = ARGV[0]
+old_value = ARGV[1]
+new_value = ARGV[2]
+repo_path = Dir.pwd
+key_id = ENV.delete('GL_ID')
+
+require_relative '../lib/gitlab_custom_hook'
+
+if GitlabCustomHook.new(repo_path, key_id).update(ref_name, old_value, new_value)
+ exit 0
+else
+ exit 1
+end