repo
scope. GitHubactions:read
permission to use this endpoint.curl --location --request GET 'https://api.github.com/repos///environments/'
{
"created_at": "2020-11-23T22:00:40.000Z",
"deployment_branch_policy": {
"custom_branch_policies": true,
"protected_branches": true
},
"html_url": "https://github.com/github/hello-world/deployments/activity_log?environments_filter=staging",
"id": 56780428,
"name": "staging",
"node_id": "MDExOkVudmlyb25tZW50NTY3ODA0Mjg=",
"protection_rules": [
{
"id": 3515,
"node_id": "MDQ6R2F0ZTM1MTU=",
"type": "wait_timer",
"wait_timer": 30
}
],
"updated_at": "2020-11-23T22:00:40.000Z",
"url": "https://api.github.com/repos/github/hello-world/environments/staging"
}
null
.custom_branch_policies
is true
, protected_branches
must be false
; if custom_branch_policies
is false
, protected_branches
must be true
.protected_branches
is true
, custom_branch_policies
must be false
; if protected_branches
is false
, custom_branch_policies
must be true
.