debian-mirror-gitlab/lib/bulk_imports/groups/transformers/subgroup_to_entity_transformer.rb
2021-04-17 20:07:23 +05:30

20 lines
475 B
Ruby

# frozen_string_literal: true
module BulkImports
module Groups
module Transformers
class SubgroupToEntityTransformer
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