Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

add "list pipeline jobs" handler#378

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed

Conversation

akaWolf
Copy link

as described here:
https://docs.gitlab.com/ee/api/jobs.html#list-pipeline-jobs

example:
jobs = pipeline.jobs.list()

Copy link
Contributor

@gpocentekgpocentek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Thnk you for this MR!

Could you have a look at the comments?

@@ -1764,6 +1768,12 @@ def create(self, data, **kwargs):
return CreateMixin.create(self, data, path=path, **kwargs)


class PipelineJobManager(ListMixin, RESTManager):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Since you can list and get jobs, you should use aRetrieveMixin here.

@@ -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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

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 aPipelineJob object class instead?

@ahsobhi
Copy link

i was just going to create a pull request for such handler, and it is very useful as well. Thanks to@akaWolf and@gpocentek

@gpocentek
Copy link
Contributor

I'm closing this MR since there's been no update, and#413 implements the feature.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@gpocentekgpocentekgpocentek left review comments

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@akaWolf@ahsobhi@gpocentek

[8]ページ先頭

©2009-2025 Movatter.jp