Description Usage Arguments Details Value Examples
View source: R/collaborators.R
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.
1 | delete_collaborator(user, repo, project, org, ...)
|
user |
(string) The login of the user. |
repo |
(string, optional) The repository specified in the format:
|
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 |
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:
https://docs.github.com/en/rest/reference/repos#remove-a-repository-collaborator
https://docs.github.com/en/rest/reference/projects#remove-user-as-a-collaborator
https://docs.github.com/en/rest/reference/orgs#remove-outside-collaborator-from-an-organization
delete_collaborator()
returns a TRUE if successfully deleted.
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.