summaryrefslogtreecommitdiff
path: root/gitlab.py
diff options
context:
space:
mode:
Diffstat (limited to 'gitlab.py')
-rw-r--r--gitlab.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/gitlab.py b/gitlab.py
index 6365d80..ac86bef 100644
--- a/gitlab.py
+++ b/gitlab.py
@@ -683,6 +683,16 @@ class ProjectKey(GitlabObject):
requiredCreateAttrs = ['project_id', 'title', 'key']
+class ProjectEvent(GitlabObject):
+ _url = '/projects/%(project_id)s/events'
+ canGet = False
+ canDelete = False
+ canUpdate = False
+ canCreate = False
+ requiredListAttrs = ['project_id']
+ shortPrintAttr = 'target_title'
+
+
class ProjectHook(GitlabObject):
_url = '/projects/%(project_id)s/hooks'
requiredListAttrs = ['project_id']
@@ -844,6 +854,11 @@ class Project(GitlabObject):
project_id=self.id,
**kwargs)
+ def Event(self, id=None, **kwargs):
+ return self._getListOrObject(ProjectEvent, id,
+ project_id=self.id,
+ **kwargs)
+
def Hook(self, id=None, **kwargs):
return self._getListOrObject(ProjectHook, id,
project_id=self.id,