summaryrefslogtreecommitdiff
path: root/gitlab.py
diff options
context:
space:
mode:
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,