Skip to content

Commit ee98e97

Browse files
committed
Merge pull request hub4j#80 from rtyley/remove-member-of-org
Add support for removing a user from an Organisation
2 parents ff63baf + 769cdc7 commit ee98e97

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/main/java/org/kohsuke/github/GHOrganization.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,14 @@ public boolean hasMember(GHUser user) {
5757
}
5858
}
5959

60+
/**
61+
* Remove a member of the organisation - which will remove them from
62+
* all teams, and remove their access to the organization’s repositories.
63+
*/
64+
public void remove(GHUser user) throws IOException {
65+
root.retrieve().method("DELETE").to("/orgs/" + login + "/members/" + user.getLogin());
66+
}
67+
6068
/**
6169
* Checks if this organization has the specified user as a public member.
6270
*/

0 commit comments

Comments
 (0)