Skip to main content

team_access_restrictions

Overview

Nameteam_access_restrictions
TypeResource
Idgithub.repos.team_access_restrictions

Fields

NameDatatypeDescription
idinteger
namestring
descriptionstring
privacystring
notification_settingstring
permissionstring
node_idstring
repositories_urlstring
html_urlstring
members_urlstring
parentobjectGroups of organization members that gives permissions on specified repositories.
permissionsobject
slugstring
urlstring

Methods

NameAccessible byRequired ParamsDescription
get_teams_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 teams who have push access to this branch. The list includes child teams.
add_team_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 teams push access for this branch. You can also give push access to child teams.
remove_team_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 team to push to this branch. You can also remove push access for child teams.
set_team_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 teams that have push access to this branch. This removes all teams that previously had push access and grants push access to the new list of teams. Team restrictions include child teams.