2012-04-21 12:45:43 +03:00
|
|
|
namespace :gitlab do
|
|
|
|
namespace :app do
|
|
|
|
desc "GITLAB | Enable auto merge"
|
2012-09-26 04:18:10 -07:00
|
|
|
task :enable_automerge => :environment do
|
2012-08-29 00:04:06 +03:00
|
|
|
Gitlab::Gitolite.new.enable_automerge
|
2012-04-21 12:45:43 +03:00
|
|
|
|
2012-04-22 15:19:09 +03:00
|
|
|
Project.find_each do |project|
|
2012-04-22 16:14:01 +03:00
|
|
|
if project.repo_exists? && !project.satellite.exists?
|
2012-04-22 15:19:09 +03:00
|
|
|
puts "Creating satellite for #{project.name}...".green
|
2012-04-22 16:14:01 +03:00
|
|
|
project.satellite.create
|
2012-04-22 15:19:09 +03:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2012-04-21 12:45:43 +03:00
|
|
|
puts "Done!".green
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|