Skip to content

Commit

Permalink
feat(api): support listing pipelines triggered by pipeline schedules
Browse files Browse the repository at this point in the history
  • Loading branch information
Steve Vermeulen authored and nejch committed Dec 11, 2022
1 parent b6c0872 commit 865fa41
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions gitlab/v4/objects/pipelines.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
"ProjectPipelineVariableManager",
"ProjectPipelineScheduleVariable",
"ProjectPipelineScheduleVariableManager",
"ProjectPipelineSchedulePipeline",
"ProjectPipelineSchedulePipelineManager",
"ProjectPipelineSchedule",
"ProjectPipelineScheduleManager",
"ProjectPipelineTestReport",
Expand Down Expand Up @@ -184,8 +186,19 @@ class ProjectPipelineScheduleVariableManager(
_update_attrs = RequiredOptional(required=("key", "value"))


class ProjectPipelineSchedulePipeline(RESTObject):
pass


class ProjectPipelineSchedulePipelineManager(ListMixin, RESTManager):
_path = "/projects/{project_id}/pipeline_schedules/{pipeline_schedule_id}/pipelines"
_obj_cls = ProjectPipelineSchedulePipeline
_from_parent_attrs = {"project_id": "project_id", "pipeline_schedule_id": "id"}


class ProjectPipelineSchedule(SaveMixin, ObjectDeleteMixin, RESTObject):
variables: ProjectPipelineScheduleVariableManager
pipelines: ProjectPipelineSchedulePipelineManager

@cli.register_custom_action("ProjectPipelineSchedule")
@exc.on_http_error(exc.GitlabOwnershipError)
Expand Down

0 comments on commit 865fa41

Please sign in to comment.