delete_membership: Remove a member from an organization or team.

Description Usage Arguments Details Value Examples

View source: R/memberships.R

Description

This function removes a user from an organization or team. Removing someone from a team does not remove them from the organization, whereas removing them from an organization also removes them from any teams within the organization.

Usage

1
delete_membership(user, org, team, ...)

Arguments

user

(string) The login of the user.

org

(string) The login of the organization.

team

(integer or string, optional) The ID or name of the team.

...

Parameters passed to gh_request().

Details

Note: you can only remove a user if the authenticate user is an organization "owner" or a team "maintainer".

For more details see the GitHub API documentation:

Value

delete_membership() returns a TRUE if successfully deleted.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 

  # Remove a user from an organization
  delete_membership("ChadGoymer", "HairyCoos")

  # Remove a user from a team
  delete_membership("ChadGoymer", "HairyCoos", "HeadCoos")


## End(Not run)

ChadGoymer/githapi documentation built on Oct. 22, 2021, 10:56 a.m.