diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2012-03-01 00:38:24 +0400 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2012-03-01 00:38:24 +0400 |
commit | bb164ebf1bd672527a76a6699427cbec728d638b (patch) | |
tree | db078b004fd285cb28af3fc801ea552b5ac83456 /lib | |
parent | 796784c7c8d385b72cd1e4b5a8f0885d630586fb (diff) |
Send author to post hook. Display push activity to dashboard
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/post-receive-hook | 2 | ||||
-rw-r--r-- | lib/tasks/update_hooks.rake | 15 |
2 files changed, 16 insertions, 1 deletions
diff --git a/lib/post-receive-hook b/lib/post-receive-hook index d7354d6515b..93eb96c2a6d 100755 --- a/lib/post-receive-hook +++ b/lib/post-receive-hook @@ -8,5 +8,5 @@ do # For every branch or tag that was pushed, create a Resque job in redis. pwd=`pwd` reponame=`basename "$pwd" | cut -d. -f1` - env -i redis-cli rpush "resque:queue:post_receive" "{\"class\":\"PostReceive\",\"args\":[\"$reponame\",\"$oldrev\",\"$newrev\",\"$ref\"]}" > /dev/null 2>&1 + env -i redis-cli rpush "resque:queue:post_receive" "{\"class\":\"PostReceive\",\"args\":[\"$reponame\",\"$oldrev\",\"$newrev\",\"$ref\",\"$GL_USER\"]}" > /dev/null 2>&1 done diff --git a/lib/tasks/update_hooks.rake b/lib/tasks/update_hooks.rake new file mode 100644 index 00000000000..472023c8f15 --- /dev/null +++ b/lib/tasks/update_hooks.rake @@ -0,0 +1,15 @@ +desc "Rewrite hooks for repos" +task :update_hooks => :environment do + puts "Starting Projects" + Project.find_each(:batch_size => 100) do |project| + begin + if project.commit + project.repository.write_hooks + print ".".green + end + rescue Exception => e + print e.message.red + end + end + puts "\nDone with projects" +end |