Skip to content

Commit 05481e9

Browse files
committed
docs(scheduled-pipeline): add java-docs
1 parent c6ad2de commit 05481e9

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
@@ -542,12 +542,20 @@ public PipelineSchedule updatePipelineSchedule(Object projectIdOrPath,PipelineSc
542542
*/
543543
public PipelineSchedule takeOwnershipPipelineSchedule(Object projectIdOrPath, Long pipelineScheduleId) throws GitLabApiException {
544544

545-
Response response = post(Response.Status.OK, "", "projects", getProjectIdOrPath(projectIdOrPath), "pipeline_schedules", pipelineScheduleId, "take_ownership");
545+
Response response = post(Response.Status.OK, "projects", getProjectIdOrPath(projectIdOrPath), "pipeline_schedules", pipelineScheduleId, "take_ownership");
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-
551559
post(Response.Status.CREATED, "projects", getProjectIdOrPath(projectIdOrPath), "pipeline_schedules", pipelineScheduleId, "play");
552560
}
553561

0 commit comments

Comments
 (0)