Github API

Getting access, Developing, Testing

Back to Github

Create a deployment branch policy

Creates a deployment branch policy for an environment.

You must authenticate using an access token with the repo scope to use this endpoint. GitHub Apps must have the administration:write permission for the repository to use this endpoint.

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. environment_name: type: string description: The name of the environment. required: - owner - repo - environment_name title: Parameters data: type: object title: Data properties: name: description: >- The name pattern that branches must match in order to deploy to the environment. Wildcard characters will not match `/`. For example, to match branches that begin with `release/` and contain an additional single slash, use `release/*/*`. For more information about pattern matching syntax, see the [Ruby File.fnmatch documentation](https://ruby-doc.org/core-2.5.1/File.html#method-c-fnmatch). type: string example: release/*

Output

type: object title: Deployment branch policy properties: id: description: The unique identifier of the branch policy. type: integer example: 361471 node_id: type: string example: MDE2OkdhdGVCcmFuY2hQb2xpY3kzNjE0NzE= name: description: >- The name pattern that branches must match in order to deploy to the environment. type: string example: release/*