Back to GithubGet access 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.
Lists who has access to this protected branch.
Note: Users, apps, and teams restrictions
are only available for organization-owned repositories.
Input
type: object
properties:
parameters:
type: object
properties:
owner:
type: string
description: The account owner of the repository. The name is not case sensitive.
repo:
type: string
description: The name of the repository. The name is not case sensitive.
branch:
type: string
description: >-
The name of the branch. Cannot contain wildcard characters. To use
wildcard characters in branch names, use [the GraphQL
API](https://docs.github.com/graphql).
required:
- owner
- repo
- branch
title: Parameters
Output
type: object
title: Branch Restriction Policy
properties:
url:
type: string
format: uri
users_url:
type: string
format: uri
teams_url:
type: string
format: uri
apps_url:
type: string
format: uri
users:
type: array
items:
type: object
properties:
login:
type: string
id:
type: integer
node_id:
type: string
avatar_url:
type: string
gravatar_id:
type: string
url:
type: string
html_url:
type: string
followers_url:
type: string
following_url:
type: string
gists_url:
type: string
starred_url:
type: string
subscriptions_url:
type: string
organizations_url:
type: string
repos_url:
type: string
events_url:
type: string
received_events_url:
type: string
type:
type: string
site_admin:
type: boolean
teams:
type: array
items:
type: object
properties:
id:
type: integer
node_id:
type: string
url:
type: string
html_url:
type: string
name:
type: string
slug:
type: string
description:
type: string
nullable: true
privacy:
type: string
notification_setting:
type: string
permission:
type: string
members_url:
type: string
repositories_url:
type: string
parent:
type: string
nullable: true
apps:
type: array
items:
type: object
properties:
id:
type: integer
slug:
type: string
node_id:
type: string
owner:
type: object
properties:
login:
type: string
id:
type: integer
node_id:
type: string
url:
type: string
repos_url:
type: string
events_url:
type: string
hooks_url:
type: string
issues_url:
type: string
members_url:
type: string
public_members_url:
type: string
avatar_url:
type: string
description:
type: string
gravatar_id:
type: string
example: '""'
html_url:
type: string
example: '"https://github.com/testorg-ea8ec76d71c3af4b"'
followers_url:
type: string
example: >-
"https://api.github.com/users/testorg-ea8ec76d71c3af4b/followers"
following_url:
type: string
example: >-
"https://api.github.com/users/testorg-ea8ec76d71c3af4b/following{/other_user}"
gists_url:
type: string
example: >-
"https://api.github.com/users/testorg-ea8ec76d71c3af4b/gists{/gist_id}"
starred_url:
type: string
example: >-
"https://api.github.com/users/testorg-ea8ec76d71c3af4b/starred{/owner}{/repo}"
subscriptions_url:
type: string
example: >-
"https://api.github.com/users/testorg-ea8ec76d71c3af4b/subscriptions"
organizations_url:
type: string
example: '"https://api.github.com/users/testorg-ea8ec76d71c3af4b/orgs"'
received_events_url:
type: string
example: >-
"https://api.github.com/users/testorg-ea8ec76d71c3af4b/received_events"
type:
type: string
example: '"Organization"'
site_admin:
type: boolean
example: false
name:
type: string
description:
type: string
external_url:
type: string
html_url:
type: string
created_at:
type: string
updated_at:
type: string
permissions:
type: object
properties:
metadata:
type: string
contents:
type: string
issues:
type: string
single_file:
type: string
events:
type: array
items:
type: string