apicheats.dev Cheat sheet Raw .md
POST

Try POST /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies — GitHub API

GitHub playground

Create a deployment branch policy

Credentials

Kept in this tab only. Requests go through apicheats.dev's same-origin proxy straight to api.github.com; the proxy stores and logs nothing about them.

Headers

Path

Body application/json

2 body fields
  • name · required · string — The name pattern that branches or tags 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 · optional · string — Whether this rule targets a branch or tag