File tree Expand file tree Collapse file tree 1 file changed +17
-2
lines changed Expand file tree Collapse file tree 1 file changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -289,15 +289,30 @@ generated by GitLab you need to:
289
289
with open('/tmp/export.tgz', 'wb') as f:
290
290
export.download(streamed=True, action=f.write)
291
291
292
- Import the project::
292
+ Import the project into the current user's namespace::
293
+
294
+ with open('/tmp/export.tgz', 'rb') as f:
295
+ output = gl.projects.import_project(
296
+ f, path='my_new_project', name='My New Project'
297
+ )
293
298
294
- output = gl.projects.import_project(open('/tmp/export.tgz', 'rb'), 'my_new_project')
295
299
# Get a ProjectImport object to track the import status
296
300
project_import = gl.projects.get(output['id'], lazy=True).imports.get()
297
301
while project_import.import_status != 'finished':
298
302
time.sleep(1)
299
303
project_import.refresh()
300
304
305
+ Import the project into a namespace and override parameters::
306
+
307
+ with open('/tmp/export.tgz', 'rb') as f:
308
+ output = gl.projects.import_project(
309
+ f,
310
+ path='my_new_project',
311
+ name='My New Project',
312
+ namespace='my-group',
313
+ override_params={'visibility': 'private'},
314
+ )
315
+
301
316
302
317
Project custom attributes
303
318
=========================
You can’t perform that action at this time.
0 commit comments