Welcome to mirror list, hosted at ThFree Co, Russian Federation.

subgroup_to_entity_transformer.rb « transformers « groups « bulk_imports « lib - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 6c3c299c2d2eb24dcb87c66c2daa376f3dd5c866 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# frozen_string_literal: true

module BulkImports
  module Groups
    module Transformers
      class SubgroupToEntityTransformer
        def initialize(*args); end

        def transform(context, entry)
          {
            source_type: :group_entity,
            source_full_path: entry['full_path'],
            destination_name: entry['name'],
            destination_namespace: context.entity.group.full_path,
            parent_id: context.entity.id
          }
        end
      end
    end
  end
end