Github API - Test Config

GET /repos/{owner}/{repo}/branches/{branch}/protection
repos

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.
Get branch protection

Arguments
key owner

owner [scalar]

The account owner of the repository. The name is not case sensitive.

API:
Github Open API
(version: 1.1.4)

key repo

repo [scalar]

The name of the repository. The name is not case sensitive.

API:
Github Open API
(version: 1.1.4)

key branch

branch [scalar]

The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use the GraphQL API.

API:
Github Open API
(version: 1.1.4)

Returns
200 application/json branch-protection

branch-protection [object]

Branch Protection

Attributes
allow_deletions 1920

allow_force_pushes 1921

allow_fork_syncing 1922

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 1923

enabled boolean

lock_branch 1924

Whether to set the branch as read-only. If this is true, users will not be able to push to the branch.

name string

protection_url string

required_conversation_resolution 1925

required_linear_history 1926

required_pull_request_reviews protected-branch-pull-request-review

required_signatures 1927

url string

API:
Github Open API
(version: 1.1.4)
404 not_found

not_found [scalar]

Resource not found

API:
Github Open API
(version: 1.1.4)
API:
Github Open API
(version: 1.1.4)