diff --git a/gitlab/v4/objects.py b/gitlab/v4/objects.py index 85aba126e..6b9170668 100644 --- a/gitlab/v4/objects.py +++ b/gitlab/v4/objects.py @@ -1707,6 +1707,10 @@ def raw(self, file_path, ref, streamed=False, action=None, chunk_size=1024, class ProjectPipeline(RESTObject): + _managers = ( + ('jobs', 'PipelineJobManager'), + ) + @cli.register_custom_action('ProjectPipeline') @exc.on_http_error(exc.GitlabPipelineCancelError) def cancel(self, **kwargs): @@ -1764,6 +1768,12 @@ def create(self, data, **kwargs): return CreateMixin.create(self, data, path=path, **kwargs) +class PipelineJobManager(ListMixin, RESTManager): + _path = '/projects/%(project_id)s/pipelines/%(pipeline_id)s/jobs' + _obj_cls = ProjectJob + _from_parent_attrs = {'project_id': 'project_id', 'pipeline_id': 'id'} + + class ProjectSnippetNote(SaveMixin, ObjectDeleteMixin, RESTObject): pass