Skip to main content

user_access_restrictions

Overview

Nameuser_access_restrictions
TypeResource
Idgithub.repos.user_access_restrictions

Fields

NameDatatype
idinteger
namestring
avatar_urlstring
emailstring
events_urlstring
followers_urlstring
following_urlstring
gists_urlstring
gravatar_idstring
html_urlstring
loginstring
node_idstring
organizations_urlstring
received_events_urlstring
repos_urlstring
site_adminboolean
starred_atstring
starred_urlstring
subscriptions_urlstring
typestring
urlstring

Methods

NameAccessible byRequired ParamsDescription
get_users_with_access_to_protected_branchSELECTbranch, owner, repoProtected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

Lists the people who have push access to this branch.
add_user_access_restrictionsINSERTbranch, owner, repoProtected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

Grants the specified people push access for this branch.

| Type | Description |
| ------- | ----------------------------------------------------------------------------------------------------------------------------- |
| array | Usernames for people who can have push access. Note: The list of users, apps, and teams in total is limited to 100 items. |
remove_user_access_restrictionsDELETEbranch, owner, repoProtected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

Removes the ability of a user to push to this branch.

| Type | Description |
| ------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| array | Usernames of the people who should no longer have push access. Note: The list of users, apps, and teams in total is limited to 100 items. |
set_user_access_restrictionsEXECbranch, owner, repoProtected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.

Replaces the list of people that have push access to this branch. This removes all people that previously had push access and grants push access to the new list of people.

| Type | Description |
| ------- | ----------------------------------------------------------------------------------------------------------------------------- |
| array | Usernames for people who can have push access. Note: The list of users, apps, and teams in total is limited to 100 items. |