Skip to content

Commit 34a723b

Browse files
committed
Added deletePipeline() (#313).
1 parent 26437a4 commit 34a723b

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

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

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,19 @@ public Pipeline createPipeline(Object projectIdOrPath, String ref) throws GitLab
227227
return (response.readEntity(Pipeline.class));
228228
}
229229

230+
/**
231+
* Delete a pipeline from a project.
232+
*
233+
* <pre><code>GitLab Endpoint: DELETE /projects/:id/pipelines/:pipeline_id</code></pre>
234+
*
235+
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
236+
* @param pipelineId the pipeline ID to delete
237+
* @throws GitLabApiException if any exception occurs during execution
238+
*/
239+
public void deletePipeline(Object projectIdOrPath, int pipelineId) throws GitLabApiException {
240+
delete(Response.Status.ACCEPTED, null, "projects", getProjectIdOrPath(projectIdOrPath), "pipelines", pipelineId);
241+
}
242+
230243
/**
231244
* Retry a job in specified pipelines in a project.
232245
*

0 commit comments

Comments
 (0)