gitlab-org--gitlab-foss/db/fixtures/development/24_forks.rb
Zeger-Jan van de Weg b281627fbd
Fixture for forks
Forks influence the working of GitLab, and now getting in a fork is a
situation that's harder than it needs to be.
2018-12-06 13:20:32 +01:00

16 lines
384 B
Ruby

require './spec/support/sidekiq'
Sidekiq::Testing.inline! do
Gitlab::Seeder.quiet do
User.all.sample(10).each do |user|
source_project = Project.public_only.sample
fork_project = Projects::ForkService.new(source_project, user, namespace: user.namespace).execute
if fork_project.valid?
puts '.'
else
puts 'F'
end
end
end
end