Create deployment branch rule with Github REST API

Viewed 98

I'm using the github rest api to create repo environments:

https://docs.github.com/en/rest/reference/repos#create-or-update-an-environment

The api allows us to select deployment_branch_policy.custom_branch_policies: (boolean) but I can't find a way of creating a deployment branch rule with a custom pattern, like you would do on the UI:

enter image description here

Is there any way of creating this through the REST api?

Many thanks

0 Answers
Related