Skip to content

Commit 1e3061c

Browse files
author
Gauvain Pocentek
committed
add support for project deploy keys
1 parent 42bef0a commit 1e3061c

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

gitlab.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -485,6 +485,7 @@ def protect(self, protect=True):
485485
def unprotect(self):
486486
self.protect(False)
487487

488+
488489
class ProjectCommit(GitlabObject):
489490
_url = '/projects/%(project_id)d/repository/commits'
490491
canGet = False
@@ -493,6 +494,11 @@ class ProjectCommit(GitlabObject):
493494
canCreate = False
494495

495496

497+
class ProjectKey(GitlabObject):
498+
_url = '/projects/%(project_id)d/keys'
499+
canUpdate = False
500+
501+
496502
class ProjectHook(GitlabObject):
497503
_url = '/projects/%(project_id)d/hooks'
498504

@@ -602,6 +608,11 @@ def Hook(self, id=None, **kwargs):
602608
project_id=self.id,
603609
**kwargs)
604610

611+
def Key(self, id=None, **kwargs):
612+
return self._getListOrObject(ProjectKey, id,
613+
project_id=self.id,
614+
**kwargs)
615+
605616
def Issue(self, id=None, **kwargs):
606617
return self._getListOrObject(ProjectIssue, id,
607618
project_id=self.id,

0 commit comments

Comments
 (0)