Skip to content

Commit 32d4224

Browse files
author
Mart Sõmermaa
committed
Add support for project events.
1 parent 6705928 commit 32d4224

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

gitlab.py

+15
Original file line numberDiff line numberDiff line change
@@ -683,6 +683,16 @@ class ProjectKey(GitlabObject):
683683
requiredCreateAttrs = ['project_id', 'title', 'key']
684684

685685

686+
class ProjectEvent(GitlabObject):
687+
_url = '/projects/%(project_id)s/events'
688+
canGet = False
689+
canDelete = False
690+
canUpdate = False
691+
canCreate = False
692+
requiredListAttrs = ['project_id']
693+
shortPrintAttr = 'target_title'
694+
695+
686696
class ProjectHook(GitlabObject):
687697
_url = '/projects/%(project_id)s/hooks'
688698
requiredListAttrs = ['project_id']
@@ -844,6 +854,11 @@ def Commit(self, id=None, **kwargs):
844854
project_id=self.id,
845855
**kwargs)
846856

857+
def Event(self, id=None, **kwargs):
858+
return self._getListOrObject(ProjectEvent, id,
859+
project_id=self.id,
860+
**kwargs)
861+
847862
def Hook(self, id=None, **kwargs):
848863
return self._getListOrObject(ProjectHook, id,
849864
project_id=self.id,

0 commit comments

Comments
 (0)