We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1e3061c commit 1625e55Copy full SHA for 1625e55
gitlab.py
@@ -50,6 +50,10 @@ class GitlabProtectError(Exception):
50
pass
51
52
53
+class GitlabTransferProjectError(Exception):
54
+ pass
55
+
56
57
class GitlabAuthenticationError(Exception):
58
59
@@ -445,6 +449,13 @@ class Group(GitlabObject):
445
449
_url = '/groups'
446
450
_constructorTypes = {'projects': 'Project'}
447
451
452
+ def transfer_project(self, id):
453
+ url = '/groups/%d/projects/%d?private_token=%s' % \
454
+ (self.id, id, self.gitlab.private_token)
455
+ r = self.gitlab.rawPost(url, None)
456
+ if r.status_code != 201:
457
+ raise GitlabTransferProjectError()
458
448
459
460
class Hook(GitlabObject):
461
_url = '/hooks'
0 commit comments