Skip to content

Commit

Permalink
implement project transfer support
Browse files Browse the repository at this point in the history
  • Loading branch information
Gauvain Pocentek committed Mar 24, 2013
1 parent 1e3061c commit 1625e55
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions gitlab.py
Expand Up @@ -50,6 +50,10 @@ class GitlabProtectError(Exception):
pass


class GitlabTransferProjectError(Exception):
pass


class GitlabAuthenticationError(Exception):
pass

Expand Down Expand Up @@ -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'
Expand Down

0 comments on commit 1625e55

Please sign in to comment.