u = User.find_by_username('root')
p = Project.find_by_full_path('root/web')
unless p
  p = Projects::CreateService.new(u, {name: 'web', path: 'web', namespace_id: u.namespace.id, visibility_level: 20, initialize_with_readme: true}).execute
  raise p.errors.full_messages.join(', ') unless p.persisted?
end
i = p.issues.find_by_iid(1) || Issues::CreateService.new(project: p, current_user: u, params: {title: 'Composer loses focus', description: 'Typing in the composer loses focus after selecting a suggestion.'}).execute
n = i.notes.where(system: false).first || Notes::CreateService.new(p, u, {noteable: i, note: 'I can reproduce this on GitLab 13.12.'}).execute
AwardEmoji.find_or_create_by!(user: u, awardable: n, name: 'thumbsup')
t = u.personal_access_tokens.create!(name: 'synthetic-evidence', scopes: ['api', 'read_repository'], expires_at: 7.days.from_now)
File.write('/tmp/evidence-token', t.token)
puts "Seeded #{p.full_path}, issue #{i.iid}, comment #{n.id} with thumbsup"
