branch_protection
Overview
Name | branch_protection |
Type | Resource |
Id | github.repos.branch_protection |
Fields
Name | Datatype | Description |
---|---|---|
name | string | |
allow_deletions | object | |
allow_force_pushes | object | |
allow_fork_syncing | object | Whether users can pull changes from upstream when the branch is locked. Set to true to allow fork syncing. Set to false to prevent fork syncing. |
block_creations | object | |
enabled | boolean | |
enforce_admins | object | Protected Branch Admin Enforced |
lock_branch | object | Whether to set the branch as read-only. If this is true, users will not be able to push to the branch. |
protection_url | string | |
required_conversation_resolution | object | |
required_linear_history | object | |
required_pull_request_reviews | object | Protected Branch Pull Request Review |
required_signatures | object | |
required_status_checks | object | Protected Branch Required Status Check |
restrictions | object | Branch Restriction Policy |
url | string |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get_branch_protection | SELECT | branch, owner, repo | Protected 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_branch_protection | DELETE | branch, owner, repo | Protected 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. |
update_branch_protection | EXEC | branch, owner, repo, data__enforce_admins, data__required_pull_request_reviews, data__required_status_checks, data__restrictions | Protected 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. Protecting a branch requires admin or owner permissions to the repository. Note: Passing new arrays of users and teams replaces their previous values.Note: The list of users, apps, and teams in total is limited to 100 items. |