Skip to content

Commit

Permalink
Merge pull request #276 from thug-gamer/patch-1
Browse files Browse the repository at this point in the history
Add support to delete a team
  • Loading branch information
kohsuke committed Jun 3, 2016
2 parents b750707 + 007378c commit 37c4731
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
Expand Up @@ -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;
Expand Down

0 comments on commit 37c4731

Please sign in to comment.