summaryrefslogtreecommitdiff
path: root/gitlab/objects.py
diff options
context:
space:
mode:
Diffstat (limited to 'gitlab/objects.py')
-rw-r--r--gitlab/objects.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/gitlab/objects.py b/gitlab/objects.py
index 76cc219..04f9e47 100644
--- a/gitlab/objects.py
+++ b/gitlab/objects.py
@@ -1075,6 +1075,19 @@ class ProjectCommitManager(BaseManager):
obj_cls = ProjectCommit
+class ProjectEnvironment(GitlabObject):
+ _url = '/projects/%(project_id)s/environments'
+ canGet = 'from_list'
+ requiredUrlAttrs = ['project_id']
+ requiredCreateAttrs = ['name']
+ optionalCreateAttrs = ['external_url']
+ optionalUpdateAttrs = ['name', 'external_url']
+
+
+class ProjectEnvironmentManager(BaseManager):
+ obj_cls = ProjectEnvironment
+
+
class ProjectKey(GitlabObject):
_url = '/projects/%(project_id)s/keys'
canUpdate = False
@@ -1659,6 +1672,7 @@ class Project(GitlabObject):
[('project_id', 'id')]),
('commit_statuses', ProjectCommitStatusManager,
[('project_id', 'id')]),
+ ('environments', ProjectEnvironmentManager, [('project_id', 'id')]),
('events', ProjectEventManager, [('project_id', 'id')]),
('files', ProjectFileManager, [('project_id', 'id')]),
('forks', ProjectForkManager, [('project_id', 'id')]),