From a8070685eb6776a12f305a4bc4b8b015d8adc9f5 Mon Sep 17 00:00:00 2001 From: gouglhupf Date: Wed, 6 Mar 2019 17:09:59 +0100 Subject: [PATCH 1/2] feat(GitLab Update): delete ProjectPipeline As of Gitlab 11.6 it is now possible to delete a pipeline - https://docs.gitlab.com/ee/api/pipelines.html#delete-a-pipeline --- gitlab/v4/objects.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gitlab/v4/objects.py b/gitlab/v4/objects.py index b9769baba..349d84d1b 100644 --- a/gitlab/v4/objects.py +++ b/gitlab/v4/objects.py @@ -2714,7 +2714,7 @@ class ProjectPipelineJobManager(ListMixin, RESTManager): _list_filters = ('scope',) -class ProjectPipeline(RESTObject, RefreshMixin): +class ProjectPipeline(RESTObject, RefreshMixin, ObjectDeleteMixin): _managers = (('jobs', 'ProjectPipelineJobManager'), ) @cli.register_custom_action('ProjectPipeline') @@ -2748,7 +2748,7 @@ def retry(self, **kwargs): self.manager.gitlab.http_post(path) -class ProjectPipelineManager(RetrieveMixin, CreateMixin, RESTManager): +class ProjectPipelineManager(RetrieveMixin, CreateMixin, DeleteMixin, RESTManager): _path = '/projects/%(project_id)s/pipelines' _obj_cls = ProjectPipeline _from_parent_attrs = {'project_id': 'id'} From c15360fff6ee47eac395aa3b9cec102be2458f54 Mon Sep 17 00:00:00 2001 From: gouglhupf Date: Thu, 7 Mar 2019 11:50:15 +0100 Subject: [PATCH 2/2] fix(pep8): PEP 8 formatting --- gitlab/v4/objects.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gitlab/v4/objects.py b/gitlab/v4/objects.py index 349d84d1b..2175e0c3c 100644 --- a/gitlab/v4/objects.py +++ b/gitlab/v4/objects.py @@ -2748,7 +2748,8 @@ def retry(self, **kwargs): self.manager.gitlab.http_post(path) -class ProjectPipelineManager(RetrieveMixin, CreateMixin, DeleteMixin, RESTManager): +class ProjectPipelineManager(RetrieveMixin, CreateMixin, DeleteMixin, + RESTManager): _path = '/projects/%(project_id)s/pipelines' _obj_cls = ProjectPipeline _from_parent_attrs = {'project_id': 'id'}