2012-04-21 05:45:43 -04:00
|
|
|
namespace :gitlab do
|
|
|
|
namespace :app do
|
|
|
|
desc "GITLAB | Enable auto merge"
|
|
|
|
task :enable_automerge => :environment do
|
2012-05-26 06:37:49 -04:00
|
|
|
Gitlab::GitHost.system.new.configure do |git|
|
2012-04-21 05:45:43 -04:00
|
|
|
git.admin_all_repo
|
|
|
|
end
|
|
|
|
|
2012-04-22 08:19:09 -04:00
|
|
|
Project.find_each do |project|
|
2012-04-22 09:14:01 -04:00
|
|
|
if project.repo_exists? && !project.satellite.exists?
|
2012-04-22 08:19:09 -04:00
|
|
|
puts "Creating satellite for #{project.name}...".green
|
2012-04-22 09:14:01 -04:00
|
|
|
project.satellite.create
|
2012-04-22 08:19:09 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2012-04-21 05:45:43 -04:00
|
|
|
puts "Done!".green
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|