summaryrefslogtreecommitdiff
path: root/lib/api/bulk_imports.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-01-18 19:00:14 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2023-01-18 19:00:14 +0000
commit05f0ebba3a2c8ddf39e436f412dc2ab5bf1353b2 (patch)
tree11d0f2a6ec31c7793c184106cedc2ded3d9a2cc5 /lib/api/bulk_imports.rb
parentec73467c23693d0db63a797d10194da9e72a74af (diff)
downloadgitlab-ce-05f0ebba3a2c8ddf39e436f412dc2ab5bf1353b2.tar.gz
Add latest changes from gitlab-org/gitlab@15-8-stable-eev15.8.0-rc42
Diffstat (limited to 'lib/api/bulk_imports.rb')
-rw-r--r--lib/api/bulk_imports.rb28
1 files changed, 23 insertions, 5 deletions
diff --git a/lib/api/bulk_imports.rb b/lib/api/bulk_imports.rb
index a28db321348..6c07b15329e 100644
--- a/lib/api/bulk_imports.rb
+++ b/lib/api/bulk_imports.rb
@@ -33,7 +33,7 @@ module API
end
before do
- not_found! unless ::BulkImports::Features.enabled?
+ not_found! unless Gitlab::CurrentSettings.bulk_import_enabled?
authenticate!
end
@@ -61,12 +61,30 @@ module API
type: String,
desc: 'Source entity type (only `group_entity` is supported)',
values: %w[group_entity]
- requires :source_full_path, type: String, desc: 'Source full path of the entity to import'
- requires :destination_namespace, type: String, desc: 'Destination namespace for the entity'
- optional :destination_slug, type: String, desc: 'Destination slug for the entity'
+ requires :source_full_path,
+ type: String,
+ desc: 'Relative path of the source entity to import',
+ source_full_path: true,
+ documentation: { example: "'source/full/path' not 'https://example.com/source/full/path'" }
+ requires :destination_namespace,
+ type: String,
+ desc: 'Destination namespace for the entity',
+ destination_namespace_path: true,
+ documentation: { example: "'destination_namespace' or 'destination/namespace'" }
+ optional :destination_slug,
+ type: String,
+ desc: 'Destination slug for the entity',
+ destination_slug_path: true,
+ documentation: { example: "'destination_slug' not 'destination/slug'" }
optional :destination_name,
type: String,
- desc: 'Deprecated: Use :destination_slug instead. Destination slug for the entity'
+ desc: 'Deprecated: Use :destination_slug instead. Destination slug for the entity',
+ destination_slug_path: true,
+ documentation: { example: "'destination_slug' not 'destination/slug'" }
+ optional :migrate_projects,
+ type: Boolean,
+ default: true,
+ desc: 'Indicates group migration should include nested projects'
mutually_exclusive :destination_slug, :destination_name
at_least_one_of :destination_slug, :destination_name