add "list pipeline jobs" handler - #378
Conversation
as described here: https://docs.gitlab.com/ee/api/jobs.html#list-pipeline-jobs example: `jobs = pipeline.jobs.list()`
c4b595b to
2848455
Compare
gpocentek
left a comment
There was a problem hiding this comment.
Thnk you for this MR!
Could you have a look at the comments?
| return CreateMixin.create(self, data, path=path, **kwargs) | ||
|
|
||
|
|
||
| class PipelineJobManager(ListMixin, RESTManager): |
There was a problem hiding this comment.
Since you can list and get jobs, you should use a RetrieveMixin here.
|
|
||
| class PipelineJobManager(ListMixin, RESTManager): | ||
| _path = '/projects/%(project_id)s/pipelines/%(pipeline_id)s/jobs' | ||
| _obj_cls = ProjectJob |
There was a problem hiding this comment.
Although this seems to be a good idea to use a ProjectJob, things get a bit more complicated than expected when using the CLI. To avoid bad surprises I try to stick to the upstream API logic: we are requesting a different URL so we get a different object class.
Could you create and use a PipelineJob object class instead?
|
i was just going to create a pull request for such handler, and it is very useful as well. Thanks to @akaWolf and @gpocentek |
|
I'm closing this MR since there's been no update, and #413 implements the feature. |
as described here:
https://docs.gitlab.com/ee/api/jobs.html#list-pipeline-jobs
example:
jobs = pipeline.jobs.list()