gitlab rake tasks refactored
This commit is contained in:
parent
c40c627a3b
commit
43f5df21a3
15 changed files with 152 additions and 120 deletions
19
lib/tasks/gitlab/update_hooks.rake
Normal file
19
lib/tasks/gitlab/update_hooks.rake
Normal file
|
@ -0,0 +1,19 @@
|
|||
namespace :gitlab do
|
||||
namespace :gitolite do
|
||||
desc "GITLAB | 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.write_hooks
|
||||
print ".".green
|
||||
end
|
||||
rescue Exception => e
|
||||
print e.message.red
|
||||
end
|
||||
end
|
||||
puts "\nDone with projects"
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue