delete_collaborator: Remove a collaborator from a repository, project or...

Description Usage Arguments Details Value Examples

View source: R/collaborators.R

Description

This function removes a collaborator from a repository, project or organization. Removing someone from a repository or project does not remove them from the organization, whereas removing them from an organization also removes them from any repositories and project within the organization.

Usage

1
delete_collaborator(user, repo, project, org, ...)

Arguments

user

(string) The login of the user.

repo

(string, optional) The repository specified in the format: owner/repo.

project

(integer or string, optional) Either the project number or name.

org

(string, optional) The name of the organization. Only required for projects.

...

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_collaborator() returns a TRUE if successfully deleted.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## Not run: 

  # Remove a collaborator from a repository
  delete_collaborator(user = "ChadGoymer", repo = "ChadGoymer/githapi")

  # Remove a collaborator from a project
  delete_collaborator(
    user    = "ChadGoymer",
    project = "Test project",
    org     = "HairyCoos"
  )

  # Remove a collaborator from an organization
  delete_collaborator(user = "ChadGoymer", org = "HairyCoos")


## End(Not run)

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