Send author to post hook. Display push activity to dashboard
This commit is contained in:
parent
796784c7c8
commit
bb164ebf1b
15 changed files with 107 additions and 11 deletions
|
@ -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
|
||||
|
|
15
lib/tasks/update_hooks.rake
Normal file
15
lib/tasks/update_hooks.rake
Normal file
|
@ -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
|
Loading…
Add table
Add a link
Reference in a new issue