diff options
Diffstat (limited to 'lib/bulk_imports/importers/group_importer.rb')
-rw-r--r-- | lib/bulk_imports/importers/group_importer.rb | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/lib/bulk_imports/importers/group_importer.rb b/lib/bulk_imports/importers/group_importer.rb index 82cb1ca03a2..6e1b86e9515 100644 --- a/lib/bulk_imports/importers/group_importer.rb +++ b/lib/bulk_imports/importers/group_importer.rb @@ -8,7 +8,6 @@ module BulkImports end def execute - entity.start! bulk_import = entity.bulk_import configuration = bulk_import.configuration @@ -18,9 +17,7 @@ module BulkImports configuration: configuration ) - BulkImports::Groups::Pipelines::GroupPipeline.new.run(context) - 'BulkImports::EE::Groups::Pipelines::EpicsPipeline'.constantize.new.run(context) if Gitlab.ee? - BulkImports::Groups::Pipelines::SubgroupEntitiesPipeline.new.run(context) + pipelines.each { |pipeline| pipeline.new.run(context) } entity.finish! end @@ -28,6 +25,15 @@ module BulkImports private attr_reader :entity + + def pipelines + [ + BulkImports::Groups::Pipelines::GroupPipeline, + BulkImports::Groups::Pipelines::SubgroupEntitiesPipeline + ] + end end end end + +BulkImports::Importers::GroupImporter.prepend_if_ee('EE::BulkImports::Importers::GroupImporter') |