diff options
author | Gauvain Pocentek <gauvain@pocentek.net> | 2013-03-24 11:44:33 +0100 |
---|---|---|
committer | Gauvain Pocentek <gauvain@pocentek.net> | 2013-03-24 11:44:33 +0100 |
commit | 1625e55f7afe0080fbc9ddcebdbfb0702e38ded6 (patch) | |
tree | b81b386285d1301fd80343b47be6846d6e1aa327 /gitlab.py | |
parent | 1e3061c826a643204cef425758996d01d3b40f74 (diff) | |
download | gitlab-1625e55f7afe0080fbc9ddcebdbfb0702e38ded6.tar.gz |
implement project transfer support
Diffstat (limited to 'gitlab.py')
-rw-r--r-- | gitlab.py | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -50,6 +50,10 @@ class GitlabProtectError(Exception): pass +class GitlabTransferProjectError(Exception): + pass + + class GitlabAuthenticationError(Exception): pass @@ -445,6 +449,13 @@ class Group(GitlabObject): _url = '/groups' _constructorTypes = {'projects': 'Project'} + def transfer_project(self, id): + url = '/groups/%d/projects/%d?private_token=%s' % \ + (self.id, id, self.gitlab.private_token) + r = self.gitlab.rawPost(url, None) + if r.status_code != 201: + raise GitlabTransferProjectError() + class Hook(GitlabObject): _url = '/hooks' |