summaryrefslogtreecommitdiff
path: root/hooks/update
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-02-06 17:39:31 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-02-06 17:39:31 +0200
commit9a407166fb5ec31e4bee70d165bb345ee9e06a6b (patch)
tree8ff4249b2978dca1fbe0fa45a4fdc185a48cb85b /hooks/update
parent96454ac5894b97bd9d94877524c77efa5d82fa14 (diff)
downloadgitlab-shell-9a407166fb5ec31e4bee70d165bb345ee9e06a6b.tar.gz
Update hook and support for protected branches
Diffstat (limited to 'hooks/update')
-rwxr-xr-xhooks/update12
1 files changed, 12 insertions, 0 deletions
diff --git a/hooks/update b/hooks/update
new file mode 100755
index 0000000..f483cc0
--- /dev/null
+++ b/hooks/update
@@ -0,0 +1,12 @@
+#!/usr/bin/env ruby
+
+# This file was placed here by GitLab. It makes sure that your pushed commits
+# will be processed properly.
+
+refname = ARGV[0]
+key_id = ENV['GL_USER']
+repo_path = `pwd`
+
+require_relative '../lib/gitlab_update'
+
+GitlabUpdate.new(repo_path, key_id, refname).exec