gitlab-org--gitlab-foss/db/fixtures/development/13_comments.rb
Dmitriy Zaporozhets 2804902cfc
Improve developer seeds
* Improt projects inline so after seeds you have repos
* Fix merge request seeds
* Add comment seeds to both issues and merge requests
* Remove some projects from seeds to increase speed

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-08-11 17:55:31 +03:00

31 lines
680 B
Ruby

Gitlab::Seeder.quiet do
Issue.all.each do |issue|
project = issue.project
project.team.users.each do |user|
note_params = {
noteable_type: 'Issue',
noteable_id: issue.id,
note: Faker::Lorem.sentence,
}
Notes::CreateService.new(project, user, note_params).execute
print '.'
end
end
MergeRequest.all.each do |mr|
project = mr.project
project.team.users.each do |user|
note_params = {
noteable_type: 'MergeRequest',
noteable_id: mr.id,
note: Faker::Lorem.sentence,
}
Notes::CreateService.new(project, user, note_params).execute
print '.'
end
end
end