BigW Consortium Gitlab

Commit 080cbcab by Z.J. van de Weg

Seed Award Emoji while seeding the database

parent d8563bd6
Gitlab::Seeder.quiet do
emoji = Gitlab::AwardEmoji.emojis.keys
Issue.all.each do |issue|
project = issue.project
project.team.users.sample(2) do |user|
issue.create_award_emoji(emoji.sample, user)
note = issue.notes.sample
note.create_award_emoji(emoji.sample, user)
print '.'
end
end
MergeRequest.all.each do |mr|
project = mr.project
project.team.users.sample(2).each do |user|
mr.create_award_emoji(emoji.sample, user)
note = mr.notes.sample
note.create_award_emoji(emoji.sample, user)
print '.'
end
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment