2014-03-15 05:39:35 -04:00
|
|
|
Gitlab::Seeder.quiet do
|
2014-08-11 10:55:31 -04:00
|
|
|
Issue.all.each do |issue|
|
|
|
|
project = issue.project
|
2014-03-15 04:23:48 -04:00
|
|
|
|
2014-08-11 10:55:31 -04:00
|
|
|
project.team.users.each do |user|
|
|
|
|
note_params = {
|
|
|
|
noteable_type: 'Issue',
|
|
|
|
noteable_id: issue.id,
|
2015-05-20 19:22:00 -04:00
|
|
|
note: FFaker::Lorem.sentence,
|
2014-08-11 10:55:31 -04:00
|
|
|
}
|
2014-03-15 05:39:35 -04:00
|
|
|
|
2014-08-11 10:55:31 -04:00
|
|
|
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,
|
2015-05-20 19:22:00 -04:00
|
|
|
note: FFaker::Lorem.sentence,
|
2014-08-11 10:55:31 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
Notes::CreateService.new(project, user, note_params).execute
|
|
|
|
print '.'
|
2014-03-15 05:39:35 -04:00
|
|
|
end
|
2014-03-15 04:23:48 -04:00
|
|
|
end
|
|
|
|
end
|