2016-06-09 04:54:43 -04:00
|
|
|
Gitlab::Seeder.quiet do
|
|
|
|
emoji = Gitlab::AwardEmoji.emojis.keys
|
2016-06-15 06:10:41 -04:00
|
|
|
|
|
|
|
Issue.order(Gitlab::Database.random).limit(Issue.count / 2).each do |issue|
|
2016-06-09 04:54:43 -04:00
|
|
|
project = issue.project
|
|
|
|
|
2016-06-10 07:31:42 -04:00
|
|
|
project.team.users.sample(2).each do |user|
|
2016-06-09 04:54:43 -04:00
|
|
|
issue.create_award_emoji(emoji.sample, user)
|
|
|
|
|
2016-06-10 06:43:11 -04:00
|
|
|
issue.notes.sample(2).each do |note|
|
|
|
|
next if note.system?
|
|
|
|
note.create_award_emoji(emoji.sample, user)
|
|
|
|
end
|
|
|
|
|
2016-06-09 04:54:43 -04:00
|
|
|
print '.'
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2016-06-15 06:10:41 -04:00
|
|
|
MergeRequest.order(Gitlab::Database.random).limit(MergeRequest.count / 2).each do |mr|
|
2016-06-09 04:54:43 -04:00
|
|
|
project = mr.project
|
|
|
|
|
|
|
|
project.team.users.sample(2).each do |user|
|
|
|
|
mr.create_award_emoji(emoji.sample, user)
|
|
|
|
|
2016-06-10 06:43:11 -04:00
|
|
|
mr.notes.sample(2).each do |note|
|
|
|
|
next if note.system?
|
|
|
|
note.create_award_emoji(emoji.sample, user)
|
|
|
|
end
|
|
|
|
|
2016-06-09 04:54:43 -04:00
|
|
|
print '.'
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|