collaborators
Overview
Name | collaborators |
Type | Resource |
Id | github.repos.collaborators |
Fields
Name | Datatype |
---|---|
id | integer |
name | string |
avatar_url | string |
email | string |
events_url | string |
followers_url | string |
following_url | string |
gists_url | string |
gravatar_id | string |
html_url | string |
login | string |
node_id | string |
organizations_url | string |
permissions | object |
received_events_url | string |
repos_url | string |
role_name | string |
site_admin | boolean |
starred_url | string |
subscriptions_url | string |
type | string |
url | string |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
list_collaborators | SELECT | owner, repo | For organization-owned repositories, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners. Organization members with write, maintain, or admin privileges on the organization-owned repository can use this endpoint. Team members will include the members of child teams. You must authenticate using an access token with the read:org and repo scopes with push access to use thisendpoint. GitHub Apps must have the members organization permission and metadata repository permission to use thisendpoint. |
remove_collaborator | DELETE | owner, repo, username | Removes a collaborator from a repository. To use this endpoint, the authenticated user must either be an administrator of the repository or target themselves for removal. This endpoint also: - Cancels any outstanding invitations - Unasigns the user from any issues - Removes access to organization projects if the user is not an organization member and is not a collaborator on any other organization repositories. - Unstars the repository - Updates access permissions to packages Removing a user as a collaborator has the following effects on forks: - If the user had access to a fork through their membership to this repository, the user will also be removed from the fork. - If the user had their own fork of the repository, the fork will be deleted. - If the user still has read access to the repository, open pull requests by this user from a fork will be denied. Note: A user can still have access to the repository through organization permissions like base repository permissions. Although the API responds immediately, the additional permission updates might take some extra time to complete in the background. For more information on fork permissions, see "About permissions and visibility of forks". |
add_collaborator | EXEC | owner, repo, username | This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. See "Secondary rate limits" and "Dealing with secondary rate limits" for details. Adding an outside collaborator may be restricted by enterprise administrators. For more information, see "Enforcing repository management policies in your enterprise." For more information on permission levels, see "Repository permission levels for an organization". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with: <br />Cannot assign {member} permission of {role name}<br /> Note that, if you choose not to pass any parameters, you'll need to set Content-Length to zero when calling out to this endpoint. For more information, see "HTTP verbs."The invitee will receive a notification that they have been invited to the repository, which they must accept or decline. They may do this via the notifications page, the email they receive, or by using the API. Updating an existing collaborator's permission level The endpoint can also be used to change the permissions of an existing collaborator without first removing and re-adding the collaborator. To change the permissions, use the same endpoint and pass a different permission parameter. The response will be a 204 , with no other indication that the permission level changed.Rate limits You are limited to sending 50 invitations to a repository per 24 hour period. Note there is no limit if you are inviting organization members to an organization repository. |
check_collaborator | EXEC | owner, repo, username | For organization-owned repositories, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners. Team members will include the members of child teams. You must authenticate using an access token with the read:org and repo scopes with push access to use thisendpoint. GitHub Apps must have the members organization permission and metadata repository permission to use thisendpoint. |