Skip to content

Commit

Permalink
add support for project deploy keys
Browse files Browse the repository at this point in the history
  • Loading branch information
Gauvain Pocentek committed Mar 24, 2013
1 parent 42bef0a commit 1e3061c
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions gitlab.py
Expand Up @@ -485,6 +485,7 @@ def protect(self, protect=True):
def unprotect(self):
self.protect(False)


class ProjectCommit(GitlabObject):
_url = '/projects/%(project_id)d/repository/commits'
canGet = False
Expand All @@ -493,6 +494,11 @@ class ProjectCommit(GitlabObject):
canCreate = False


class ProjectKey(GitlabObject):
_url = '/projects/%(project_id)d/keys'
canUpdate = False


class ProjectHook(GitlabObject):
_url = '/projects/%(project_id)d/hooks'

Expand Down Expand Up @@ -602,6 +608,11 @@ def Hook(self, id=None, **kwargs):
project_id=self.id,
**kwargs)

def Key(self, id=None, **kwargs):
return self._getListOrObject(ProjectKey, id,
project_id=self.id,
**kwargs)

def Issue(self, id=None, **kwargs):
return self._getListOrObject(ProjectIssue, id,
project_id=self.id,
Expand Down

0 comments on commit 1e3061c

Please sign in to comment.