summaryrefslogtreecommitdiff
path: root/lib/bulk_imports/groups/pipelines/labels_pipeline.rb
blob: 0dc4a968b84445439cc2a0f0ce51496d87caaa17 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# frozen_string_literal: true

module BulkImports
  module Groups
    module Pipelines
      class LabelsPipeline
        include Pipeline

        extractor BulkImports::Common::Extractors::GraphqlExtractor,
          query: BulkImports::Groups::Graphql::GetLabelsQuery

        transformer Common::Transformers::ProhibitedAttributesTransformer

        def load(context, data)
          Labels::CreateService.new(data).execute(group: context.group)
        end
      end
    end
  end
end