File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -3611,6 +3611,25 @@ def mirror_pull(self, **kwargs):
3611
3611
path = '/projects/%d/mirror/pull' % self .get_id ()
3612
3612
self .manager .gitlab .http_post (path , ** kwargs )
3613
3613
3614
+ @cli .register_custom_action ('Project' , ('to_namespace' , ))
3615
+ @exc .on_http_error (exc .GitlabTransferProjectError )
3616
+ def transfer_project (self , to_namespace , ** kwargs ):
3617
+ """Transfer a project to the given namespace ID
3618
+
3619
+ Args:
3620
+ to_namespace (str): ID or path of the namespace to transfer the
3621
+ project to
3622
+ **kwargs: Extra options to send to the server (e.g. sudo)
3623
+
3624
+ Raises:
3625
+ GitlabAuthenticationError: If authentication is not correct
3626
+ GitlabTransferProjectError: If the project could not be transfered
3627
+ """
3628
+ path = '/projects/%d/transfer' % (self .id ,)
3629
+ self .manager .gitlab .http_put (path ,
3630
+ post_data = {"namespace" : to_namespace },
3631
+ ** kwargs )
3632
+
3614
3633
3615
3634
class ProjectManager (CRUDMixin , RESTManager ):
3616
3635
_path = '/projects'
You can’t perform that action at this time.
0 commit comments