Skip to content

Commit

Permalink
Merge pull request #80 from rtyley/remove-member-of-org
Browse files Browse the repository at this point in the history
Add support for removing a user from an Organisation
  • Loading branch information
kohsuke committed Apr 13, 2014
2 parents ff63baf + 769cdc7 commit ee98e97
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/main/java/org/kohsuke/github/GHOrganization.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,14 @@ public boolean hasMember(GHUser user) {
}
}

/**
* Remove a member of the organisation - which will remove them from
* all teams, and remove their access to the organization’s repositories.
*/
public void remove(GHUser user) throws IOException {
root.retrieve().method("DELETE").to("/orgs/" + login + "/members/" + user.getLogin());
}

/**
* Checks if this organization has the specified user as a public member.
*/
Expand Down

0 comments on commit ee98e97

Please sign in to comment.