2017-08-17 22:00:37 +05:30
|
|
|
require './spec/support/sidekiq'
|
|
|
|
|
2016-06-16 23:09:34 +05:30
|
|
|
Gitlab::Seeder.quiet do
|
2017-08-17 22:00:37 +05:30
|
|
|
emoji = Gitlab::Emoji.emojis.keys
|
2016-06-16 23:09:34 +05:30
|
|
|
|
|
|
|
Issue.order(Gitlab::Database.random).limit(Issue.count / 2).each do |issue|
|
|
|
|
project = issue.project
|
|
|
|
|
|
|
|
project.team.users.sample(2).each do |user|
|
|
|
|
issue.create_award_emoji(emoji.sample, user)
|
|
|
|
|
|
|
|
issue.notes.sample(2).each do |note|
|
|
|
|
next if note.system?
|
|
|
|
note.create_award_emoji(emoji.sample, user)
|
|
|
|
end
|
|
|
|
|
|
|
|
print '.'
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
MergeRequest.order(Gitlab::Database.random).limit(MergeRequest.count / 2).each do |mr|
|
|
|
|
project = mr.project
|
|
|
|
|
|
|
|
project.team.users.sample(2).each do |user|
|
|
|
|
mr.create_award_emoji(emoji.sample, user)
|
|
|
|
|
|
|
|
mr.notes.sample(2).each do |note|
|
|
|
|
next if note.system?
|
|
|
|
note.create_award_emoji(emoji.sample, user)
|
|
|
|
end
|
|
|
|
|
|
|
|
print '.'
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|