summaryrefslogtreecommitdiff
path: root/gitlab/objects.py
diff options
context:
space:
mode:
authorGauvain Pocentek <gauvain.pocentek@objectif-libre.com>2016-01-24 19:21:19 +0100
committerGauvain Pocentek <gauvain.pocentek@objectif-libre.com>2016-01-24 19:23:34 +0100
commitc11bebd83dd0ef89645e1eefce2aa107dd79180a (patch)
tree060beb67392433246c5da37443fe24dc92460be2 /gitlab/objects.py
parent7981987141825c198d5664d843e86472b9e44f3f (diff)
downloadgitlab-c11bebd83dd0ef89645e1eefce2aa107dd79180a.tar.gz
implement project triggers support
Diffstat (limited to 'gitlab/objects.py')
-rw-r--r--gitlab/objects.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/gitlab/objects.py b/gitlab/objects.py
index 66a46f3..ddcbae7 100644
--- a/gitlab/objects.py
+++ b/gitlab/objects.py
@@ -1020,6 +1020,17 @@ class ProjectSnippetManager(BaseManager):
obj_cls = ProjectSnippet
+class ProjectTrigger(GitlabObject):
+ _url = '/projects/%(project_id)s/triggers'
+ canUpdate = False
+ idAttr = 'token'
+ requiredUrlAttrs = ['project_id']
+
+
+class ProjectTriggerManager(BaseManager):
+ obj_cls = ProjectTrigger
+
+
class Project(GitlabObject):
_url = '/projects'
_constructorTypes = {'owner': 'User', 'namespace': 'Group'}
@@ -1047,6 +1058,7 @@ class Project(GitlabObject):
('notes', ProjectNoteManager, [('project_id', 'id')]),
('snippets', ProjectSnippetManager, [('project_id', 'id')]),
('tags', ProjectTagManager, [('project_id', 'id')]),
+ ('triggers', ProjectTriggerManager, [('project_id', 'id')]),
]
def Branch(self, id=None, **kwargs):