Skip to content

Commit 0d203f7

Browse files
committed
fix(scheduled-pipeline): change post()-call
1 parent c6ad2de commit 0d203f7

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/main/java/org/gitlab4j/api/PipelineApi.java

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -546,9 +546,17 @@ public PipelineSchedule takeOwnershipPipelineSchedule(Object projectIdOrPath, Lo
546546
return (response.readEntity(PipelineSchedule.class));
547547
}
548548

549+
/**
550+
* Trigger a new scheduled pipeline, which runs immediately.
551+
*
552+
* <pre><code>POST /projects/:id/pipeline_schedules/:pipeline_schedule_id/play</code></pre>
553+
*
554+
* @param projectIdOrPath projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required
555+
* @param pipelineScheduleId the pipelineSchedule instance id which should run immediately
556+
* @throws GitLabApiException if any exception occurs during execution
557+
*/
549558
public void playPipelineSchedule(Object projectIdOrPath, Long pipelineScheduleId) throws GitLabApiException {
550-
551-
post(Response.Status.CREATED, "projects", getProjectIdOrPath(projectIdOrPath), "pipeline_schedules", pipelineScheduleId, "play");
559+
post(Response.Status.CREATED, "", "projects", getProjectIdOrPath(projectIdOrPath), "pipeline_schedules", pipelineScheduleId, "play");
552560
}
553561

554562
/**

0 commit comments

Comments
 (0)