2012-11-13 20:11:56 +00:00
|
|
|
Gitlab::Seeder.quiet do
|
2014-05-05 12:07:19 +00:00
|
|
|
Project.all.reject(&:empty_repo?).each do |project|
|
|
|
|
branches = project.repository.branch_names
|
|
|
|
|
|
|
|
branches.each do |branch_name|
|
|
|
|
break if branches.size < 2
|
|
|
|
source_branch = branches.pop
|
|
|
|
target_branch = branches.pop
|
|
|
|
|
|
|
|
params = {
|
|
|
|
source_branch: source_branch,
|
|
|
|
target_branch: target_branch,
|
|
|
|
title: Faker::Lorem.sentence(6),
|
2014-08-11 14:55:31 +00:00
|
|
|
description: Faker::Lorem.sentences(3).join(" "),
|
|
|
|
milestone: project.milestones.sample,
|
|
|
|
assignee: project.team.users.sample
|
2014-05-05 12:07:19 +00:00
|
|
|
}
|
|
|
|
|
2014-08-11 14:55:31 +00:00
|
|
|
MergeRequests::CreateService.new(project, project.team.users.sample, params).execute
|
|
|
|
print '.'
|
2013-10-04 19:11:50 +00:00
|
|
|
end
|
2012-11-13 20:11:56 +00:00
|
|
|
end
|
2012-10-30 08:03:21 +00:00
|
|
|
end
|