Skip to main content

admin_branch_protection

Overview

Nameadmin_branch_protection
TypeResource
Idgithub.repos.admin_branch_protection

Fields

NameDatatype
enabledboolean
urlstring

Methods

NameAccessible byRequired ParamsDescription
get_admin_branch_protectionSELECTbranch, 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.
delete_admin_branch_protectionDELETEbranch, 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.

Removing admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled.
set_admin_branch_protectionEXECbranch, 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.

Adding admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled.