debian-mirror-gitlab/db/fixtures/development/13_comments.rb

34 lines
729 B
Ruby
Raw Normal View History

2020-01-01 13:55:28 +05:30
require './spec/support/sidekiq_middleware'
2017-08-17 22:00:37 +05:30
2014-09-02 18:07:02 +05:30
Gitlab::Seeder.quiet do
2017-08-17 22:00:37 +05:30
Issue.find_each do |issue|
2014-09-02 18:07:02 +05:30
project = issue.project
project.team.users.each do |user|
note_params = {
noteable_type: 'Issue',
noteable_id: issue.id,
2015-09-11 14:41:01 +05:30
note: FFaker::Lorem.sentence,
2014-09-02 18:07:02 +05:30
}
Notes::CreateService.new(project, user, note_params).execute
print '.'
end
end
2017-08-17 22:00:37 +05:30
MergeRequest.find_each do |mr|
2014-09-02 18:07:02 +05:30
project = mr.project
project.team.users.each do |user|
note_params = {
noteable_type: 'MergeRequest',
noteable_id: mr.id,
2015-09-11 14:41:01 +05:30
note: FFaker::Lorem.sentence,
2014-09-02 18:07:02 +05:30
}
Notes::CreateService.new(project, user, note_params).execute
print '.'
end
end
end