gitlab-org--gitlab-foss/lib/tasks/update_hooks.rake

16 lines
348 B
Ruby
Raw Normal View History

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
2012-03-11 04:47:30 -04:00
project.write_hooks
print ".".green
end
rescue Exception => e
print e.message.red
end
end
puts "\nDone with projects"
end