diff --git a/src/main/java/org/kohsuke/github/GHRepository.java b/src/main/java/org/kohsuke/github/GHRepository.java index 73d6dfac7..6ff055358 100644 --- a/src/main/java/org/kohsuke/github/GHRepository.java +++ b/src/main/java/org/kohsuke/github/GHRepository.java @@ -272,7 +272,7 @@ public class GHRepository { private void edit(String key, String value) throws IOException { Poster poster = new Poster(root).withCredential(); if (!key.equals("name")) - poster.with("name",name); // even when we don't change the name, we need to send it in + poster.with("name", name); // even when we don't change the name, we need to send it in poster.with(key, value) .to("/repos/" + owner.login + "/" + name, null, "PATCH"); } @@ -314,12 +314,7 @@ public class GHRepository { * Deletes this repository. */ public void delete() throws IOException { - throw new UnsupportedOperationException(); // doesn't appear to be available in V3 -// Poster poster = new Poster(root).withCredential(); -// String url = "/repos/delete/" + owner.login +"/"+name; -// -// DeleteToken token = poster.to(url, DeleteToken.class); -// poster.with("delete_token", token.delete_token).to(url); + new Poster(root).withCredential().to("/repos/" + owner.login +"/"+name, null, "DELETE"); } /**