1
0
mirror of synced 2025-12-21 19:06:49 -05:00
Files
docs/content/rest/deployments/branch-policies.md

22 lines
1.0 KiB
Markdown

---
title: REST API endpoints for deployment branch policies
allowTitleToDifferFromFilename: true
shortTitle: Deployment branch policies
intro: Use the REST API to manage custom deployment branch policies.
versions: # DO NOT MANUALLY EDIT. CHANGES WILL BE OVERWRITTEN BY A 🤖
fpt: '*'
ghec: '*'
ghes: '*'
topics:
- API
autogenerated: rest
---
## About deployment branch policies
You can use the REST API to specify custom name patterns that branches must match in order to deploy to an environment. The `deployment_branch_policy.custom_branch_policies` property for the environment must be set to `true` to use these endpoints. To update the `deployment_branch_policy` for an environment, see [AUTOTITLE](/rest/deployments/environments#create-or-update-an-environment).
For more information about restricting environment deployments to certain branches, see [AUTOTITLE](/actions/deployment/targeting-different-environments/using-environments-for-deployment#deployment-branches).
<!-- Content after this section is automatically generated -->