Commit 7b98d0bc authored by James Lopez's avatar James Lopez

Merge branch 'bw-enhance-rake-seed' into 'master'

Allow parameters for rake gitlab:seed:issues

See merge request gitlab-org/gitlab-ce!30689
parents 00b944af 0175a7ab
namespace :gitlab do
namespace :seed do
desc "GitLab | Seed | Seeds issues"
task :issues, [:project_full_path] => :environment do |t, args|
task :issues, [:project_full_path, :backfill_weeks, :average_issues_per_week] => :environment do |t, args|
args.with_defaults(backfill_weeks: 5, average_issues_per_week: 2)
projects =
if args.project_full_path
project = Project.find_by_full_path(args.project_full_path)
......@@ -26,7 +28,8 @@ namespace :gitlab do
projects.each do |project|
puts "\nSeeding issues for the '#{project.full_path}' project"
seeder = Quality::Seeders::Issues.new(project: project)
issues_created = seeder.seed(backfill_weeks: 5, average_issues_per_week: 2)
issues_created = seeder.seed(backfill_weeks: args.backfill_weeks.to_i,
average_issues_per_week: args.average_issues_per_week.to_i)
puts "\n#{issues_created} issues created!"
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