diff --git a/src/main/java/org/kohsuke/github/GHDeployment.java b/src/main/java/org/kohsuke/github/GHDeployment.java index ae18580667..277e4e15fe 100644 --- a/src/main/java/org/kohsuke/github/GHDeployment.java +++ b/src/main/java/org/kohsuke/github/GHDeployment.java @@ -194,6 +194,16 @@ public String getSha() { return sha; } + /** + * Deletes this deployment. + * + * @throws IOException + * the io exception + */ + public void delete() throws IOException { + root().createRequest().method("DELETE").withUrlPath(owner.getApiTailUrl("deployments/" + getId())).send(); + } + /** * Create status gh deployment status builder. *