diff options
Diffstat (limited to 'lib/bulk_imports/groups')
-rw-r--r-- | lib/bulk_imports/groups/stage.rb | 6 | ||||
-rw-r--r-- | lib/bulk_imports/groups/transformers/subgroup_to_entity_transformer.rb | 3 |
2 files changed, 7 insertions, 2 deletions
diff --git a/lib/bulk_imports/groups/stage.rb b/lib/bulk_imports/groups/stage.rb index 0db2b1f0698..7a777f1c8e1 100644 --- a/lib/bulk_imports/groups/stage.rb +++ b/lib/bulk_imports/groups/stage.rb @@ -71,7 +71,7 @@ module BulkImports end def project_entities_pipeline - if project_pipeline_available? && feature_flag_enabled? + if migrate_projects? && project_pipeline_available? && feature_flag_enabled? { project_entities: { pipeline: BulkImports::Groups::Pipelines::ProjectEntitiesPipeline, @@ -83,6 +83,10 @@ module BulkImports end end + def migrate_projects? + bulk_import_entity.migrate_projects + end + def project_pipeline_available? @bulk_import.source_version_info >= BulkImport.min_gl_version_for_project_migration end diff --git a/lib/bulk_imports/groups/transformers/subgroup_to_entity_transformer.rb b/lib/bulk_imports/groups/transformers/subgroup_to_entity_transformer.rb index d8fb937ecd2..fcf9ed62388 100644 --- a/lib/bulk_imports/groups/transformers/subgroup_to_entity_transformer.rb +++ b/lib/bulk_imports/groups/transformers/subgroup_to_entity_transformer.rb @@ -10,7 +10,8 @@ module BulkImports source_full_path: entry['full_path'], destination_name: entry['path'], destination_namespace: context.entity.group.full_path, - parent_id: context.entity.id + parent_id: context.entity.id, + migrate_projects: context.entity.migrate_projects } end end |