|
|
|
@ -7,16 +7,17 @@ namespace :rep_fault do
|
|
|
|
|
if project.repositories.count > 0
|
|
|
|
|
unless Repository.where("project_id =? and type = ?",project, "Repository::Gitlab").blank?
|
|
|
|
|
project.repositories.each do |repository|
|
|
|
|
|
repository.update_attributes(:is_default => false)
|
|
|
|
|
repository.is_default =1
|
|
|
|
|
repository.save
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
desc "update ossean's data"
|
|
|
|
|
task :update_type => :environment do
|
|
|
|
|
repository = Repository.find(400)
|
|
|
|
|
repository.update_attributes(:type => "Repository::Git")
|
|
|
|
|
end
|
|
|
|
|
# desc "update ossean's data"
|
|
|
|
|
# task :update_type => :environment do
|
|
|
|
|
# repository = Repository.find(400)
|
|
|
|
|
# repository.update_attributes(:type => "Repository::Git")
|
|
|
|
|
# end
|
|
|
|
|
end
|