Skip to content

Commit

Permalink
feat(GitLab Update): delete ProjectPipeline (#736)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
gouglhupf authored and gpocentek committed Mar 21, 2019
1 parent 6bd1902 commit 768ce19
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions gitlab/v4/objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down Expand Up @@ -2748,7 +2748,8 @@ 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'}
Expand Down

0 comments on commit 768ce19

Please sign in to comment.