blob: f016b552fd45e5ab35a494cd0444eaa156451513 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
# frozen_string_literal: true
module BulkImports
module Importers
class GroupImporter
def initialize(entity)
@entity = entity
end
def execute
context = BulkImports::Pipeline::Context.new(entity)
pipelines.each { |pipeline| pipeline.new(context).run }
entity.finish!
end
private
attr_reader :entity
def pipelines
[
BulkImports::Groups::Pipelines::GroupPipeline,
BulkImports::Groups::Pipelines::SubgroupEntitiesPipeline,
BulkImports::Groups::Pipelines::MembersPipeline,
BulkImports::Groups::Pipelines::LabelsPipeline,
BulkImports::Groups::Pipelines::MilestonesPipeline
]
end
end
end
end
BulkImports::Importers::GroupImporter.prepend_if_ee('EE::BulkImports::Importers::GroupImporter')
|