Add 'migrate_projects' bool flag for group bulk imports'
What does this MR do and why?
This MR adds migrate_projects
bool flag to indicate if projects should be included when migrating groups using direct transfer. If it's set to false
, migrated group (and any subgroups) won't include any projects. Defaults to true.
Mentions #383332 (closed)
Screenshots or screen recordings
migrate_projects: true | migrate_projects: false |
---|---|
migrate_projects_true.mov | migrate_projects_false.mov |
How to set up and validate locally
- Enable
bulk_import_enabled
application setting in admin settings or via rails consoleApplicationSetting.first.update!(bulk_import_enabled: true)
- Enable
bulk_import_projects
feature flag via rails console:Feature.enable(:bulk_import_projects)
- Create a group with projects. Populate all entities with data (labels/issues/mrs/etc)
- Initiate a new bulk imports request with
migrate_projects: false
POST http://gdk.test:3000/api/v4/bulk_imports
PRIVATE-TOKEN: TOKEN
Content-Type: application/json
{
"configuration": {
"url": "http://gdk.test:3000/",
"access_token": "TOKEN"
},
"entities": [
{
"source_full_path": "mygroup",
"source_type": "group_entity",
"destination_slug": "destination",
"destination_namespace": "namespace",
"migrate_projects": false
}
]
}
- Observe migrated group does not have projects included
- Initiate a new bulk imports request with
migrate_projects: true
- Observe migrated group has projects included
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by George Koltsov