diff options
Diffstat (limited to 'lib/bulk_imports/projects')
5 files changed, 22 insertions, 11 deletions
diff --git a/lib/bulk_imports/projects/graphql/get_project_query.rb b/lib/bulk_imports/projects/graphql/get_project_query.rb index 04ac0916bbc..b3d7f3f4683 100644 --- a/lib/bulk_imports/projects/graphql/get_project_query.rb +++ b/lib/bulk_imports/projects/graphql/get_project_query.rb @@ -3,9 +3,8 @@ module BulkImports module Projects module Graphql - module GetProjectQuery - extend Queryable - extend self + class GetProjectQuery + include Queryable def to_s <<-'GRAPHQL' diff --git a/lib/bulk_imports/projects/graphql/get_repository_query.rb b/lib/bulk_imports/projects/graphql/get_repository_query.rb index 24efce9e276..ca777c1a7e0 100644 --- a/lib/bulk_imports/projects/graphql/get_repository_query.rb +++ b/lib/bulk_imports/projects/graphql/get_repository_query.rb @@ -3,9 +3,8 @@ module BulkImports module Projects module Graphql - module GetRepositoryQuery - extend Queryable - extend self + class GetRepositoryQuery + include Queryable def to_s <<-'GRAPHQL' diff --git a/lib/bulk_imports/projects/graphql/get_snippet_repository_query.rb b/lib/bulk_imports/projects/graphql/get_snippet_repository_query.rb index 1ba57789612..c105b04c731 100644 --- a/lib/bulk_imports/projects/graphql/get_snippet_repository_query.rb +++ b/lib/bulk_imports/projects/graphql/get_snippet_repository_query.rb @@ -3,9 +3,8 @@ module BulkImports module Projects module Graphql - module GetSnippetRepositoryQuery - extend Queryable - extend self + class GetSnippetRepositoryQuery + include Queryable def to_s <<-'GRAPHQL' @@ -27,7 +26,7 @@ module BulkImports GRAPHQL end - def variables(context) + def variables { full_path: context.entity.source_full_path, cursor: context.tracker.next_page, diff --git a/lib/bulk_imports/projects/graphql/queryable.rb b/lib/bulk_imports/projects/graphql/queryable.rb index a897632dff3..bd3116cb838 100644 --- a/lib/bulk_imports/projects/graphql/queryable.rb +++ b/lib/bulk_imports/projects/graphql/queryable.rb @@ -4,7 +4,13 @@ module BulkImports module Projects module Graphql module Queryable - def variables(context) + attr_reader :context + + def initialize(context:) + @context = context + end + + def variables { full_path: context.entity.source_full_path } end diff --git a/lib/bulk_imports/projects/stage.rb b/lib/bulk_imports/projects/stage.rb index 0556395ca66..b920c1bf355 100644 --- a/lib/bulk_imports/projects/stage.rb +++ b/lib/bulk_imports/projects/stage.rb @@ -19,6 +19,10 @@ module BulkImports pipeline: BulkImports::Projects::Pipelines::ProjectAttributesPipeline, stage: 1 }, + members: { + pipeline: BulkImports::Common::Pipelines::MembersPipeline, + stage: 1 + }, labels: { pipeline: BulkImports::Common::Pipelines::LabelsPipeline, stage: 2 @@ -83,6 +87,10 @@ module BulkImports pipeline: BulkImports::Common::Pipelines::UploadsPipeline, stage: 5 }, + lfs_objects: { + pipeline: BulkImports::Common::Pipelines::LfsObjectsPipeline, + stage: 5 + }, auto_devops: { pipeline: BulkImports::Projects::Pipelines::AutoDevopsPipeline, stage: 5 |