Back to GithubUpdate status check protection
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.
Updating required status checks requires admin or owner permissions to the repository and branch protection to be enabled.
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
data:
type: object
properties:
strict:
type: boolean
description: Require branches to be up to date before merging.
contexts:
type: array
deprecated: true
description: >
**Deprecated**: The list of status checks to require in order to merge
into this branch. If any of these checks have recently been set by a
particular GitHub App, they will be required to come from that app in
future for the branch to merge. Use `checks` instead of `contexts` for
more fine-grained control.
items:
type: string
checks:
type: array
description: >-
The list of status checks to require in order to merge into this
branch.
items:
type: object
properties:
context:
type: string
description: The name of the required check
app_id:
type: integer
description: >-
The ID of the GitHub App that must provide this check. Omit this
field to automatically select the GitHub App that has recently
provided this check, or any app if it was not set by a GitHub
App. Pass -1 to explicitly allow any app to set the status.
title: Data
Output
type: object
title: Status Check Policy
properties:
url:
type: string
format: uri
example: >-
https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_status_checks
strict:
type: boolean
example: true
contexts:
type: array
items:
type: string
checks:
type: array
items:
type: object
properties:
context:
type: string
example: continuous-integration/travis-ci
app_id:
type: integer
nullable: true
contexts_url:
type: string
format: uri
example: >-
https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_status_checks/contexts