Code of Conduct
What article on docs.github.com is affected?
https://docs.github.com/en/rest/reference/branches#update-branch-protection
What part(s) of the article would you like to see updated?
The parameters are not very clear on what to put inside required_status_checks, required_pull_request_reviews and restrictions. From the code sample, you can piece together most of it, but that example doesn't actually work. In my specific case I discovered that a required_status_checks object needs to look like below, at the minimum to enable status checks:
{
"strict": true,
"contexts": [],
"enforcement_level": "non_admins"
}
Additional information
No response
Code of Conduct
What article on docs.github.com is affected?
https://docs.github.com/en/rest/reference/branches#update-branch-protection
What part(s) of the article would you like to see updated?
The parameters are not very clear on what to put inside
required_status_checks,required_pull_request_reviewsandrestrictions. From the code sample, you can piece together most of it, but that example doesn't actually work. In my specific case I discovered that arequired_status_checksobject needs to look like below, at the minimum to enable status checks:Additional information
No response