From 1e3061c826a643204cef425758996d01d3b40f74 Mon Sep 17 00:00:00 2001 From: Gauvain Pocentek Date: Sun, 24 Mar 2013 11:30:17 +0100 Subject: add support for project deploy keys --- gitlab.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'gitlab.py') 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, -- cgit v1.2.1