debian-mirror-gitlab/lib/bulk_imports/groups/pipelines/labels_pipeline.rb
2021-03-11 19:13:27 +05:30

30 lines
752 B
Ruby

# 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
loader BulkImports::Groups::Loaders::LabelsLoader
def after_run(extracted_data)
context.entity.update_tracker_for(
relation: :labels,
has_next_page: extracted_data.has_next_page?,
next_page: extracted_data.next_page
)
if extracted_data.has_next_page?
run
end
end
end
end
end
end