From ca256a07a2cdaf77a5c20e307d334b82fd0fe861 Mon Sep 17 00:00:00 2001 From: Max Wittig Date: Thu, 24 Oct 2019 08:50:39 +0200 Subject: feat: add deployment creation Added in GitLab 12.4 Fixes #917 --- gitlab/v4/objects.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'gitlab/v4') diff --git a/gitlab/v4/objects.py b/gitlab/v4/objects.py index 44188c7..474cc2b 100644 --- a/gitlab/v4/objects.py +++ b/gitlab/v4/objects.py @@ -3735,15 +3735,16 @@ class ProjectApprovalManager(GetWithoutIdMixin, UpdateMixin, RESTManager): self.gitlab.http_put(path, post_data=data, **kwargs) -class ProjectDeployment(RESTObject): +class ProjectDeployment(RESTObject, SaveMixin): pass -class ProjectDeploymentManager(RetrieveMixin, RESTManager): +class ProjectDeploymentManager(RetrieveMixin, CreateMixin, UpdateMixin, RESTManager): _path = "/projects/%(project_id)s/deployments" _obj_cls = ProjectDeployment _from_parent_attrs = {"project_id": "id"} _list_filters = ("order_by", "sort") + _create_attrs = (("sha", "ref", "tag", "status", "environment"), tuple()) class ProjectProtectedBranch(ObjectDeleteMixin, RESTObject): -- cgit v1.2.1