summaryrefslogtreecommitdiff
path: root/gitlab.py
diff options
context:
space:
mode:
authorGauvain Pocentek <gauvain@pocentek.net>2013-03-24 11:30:17 +0100
committerGauvain Pocentek <gauvain@pocentek.net>2013-03-24 11:30:17 +0100
commit1e3061c826a643204cef425758996d01d3b40f74 (patch)
treec2fc694d9855e3887e9714f70f65dd130ec12710 /gitlab.py
parent42bef0aa598af1517810813d1bf7e10cac121690 (diff)
downloadgitlab-1e3061c826a643204cef425758996d01d3b40f74.tar.gz
add support for project deploy keys
Diffstat (limited to 'gitlab.py')
-rw-r--r--gitlab.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/gitlab.py b/gitlab.py
index 84e7ac7..33f5831 100644
--- a/gitlab.py
+++ b/gitlab.py
@@ -485,6 +485,7 @@ class ProjectBranch(GitlabObject):
def unprotect(self):
self.protect(False)
+
class ProjectCommit(GitlabObject):
_url = '/projects/%(project_id)d/repository/commits'
canGet = False
@@ -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'
@@ -602,6 +608,11 @@ class Project(GitlabObject):
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,