Skip to content

Commit

Permalink
Add support to delete a team
Browse files Browse the repository at this point in the history
Add a method to delete a team.
thug-gamer committed Apr 29, 2016

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent b750707 commit 007378c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/main/java/org/kohsuke/github/GHTeam.java
Original file line number Diff line number Diff line change
@@ -126,6 +126,13 @@ public void add(GHRepository r) throws IOException {
public void remove(GHRepository r) throws IOException {
org.root.retrieve().method("DELETE").to(api("/repos/" + r.getOwnerName() + '/' + r.getName()), null);
}

/**
* Deletes this team.
*/
public void delete() throws IOException {
org.root.retrieve().method("DELETE").to(api(""));
}

private String api(String tail) {
return "/teams/"+id+tail;

0 comments on commit 007378c

Please sign in to comment.