2012-04-21 11:45:43 +02:00
|
|
|
namespace :gitlab do
|
2012-12-20 19:38:44 +01:00
|
|
|
desc "GITLAB | Enable auto merge"
|
|
|
|
task :enable_automerge => :environment do
|
|
|
|
Gitlab::Gitolite.new.enable_automerge
|
2012-04-21 11:45:43 +02:00
|
|
|
|
2012-12-20 19:38:44 +01:00
|
|
|
Project.find_each do |project|
|
|
|
|
if project.repo_exists? && !project.satellite.exists?
|
|
|
|
puts "Creating satellite for #{project.name}...".green
|
|
|
|
project.satellite.create
|
2012-04-22 14:19:09 +02:00
|
|
|
end
|
2012-04-21 11:45:43 +02:00
|
|
|
end
|
2012-12-20 19:38:44 +01:00
|
|
|
|
|
|
|
puts "Done!".green
|
2012-04-21 11:45:43 +02:00
|
|
|
end
|
2012-12-20 21:52:26 +01:00
|
|
|
|
|
|
|
namespace :satellites do
|
|
|
|
desc "GITLAB | Create satellite repos"
|
|
|
|
task create: 'gitlab:enable_automerge'
|
|
|
|
end
|
2012-04-21 11:45:43 +02:00
|
|
|
end
|