I am trying to create a branch protection for master branch which uses all of the defaults. I can do this in the repo settings UI, e.g. only ticking "Include administrators", and leaving everything else unticked. This is useful because it leaves unticked "Allow force pushes" and "Allow deletions".
ghctl create protection -r xyz -b master --includeadmins
PUT https://api.github.com/repos/org/xyz/branches/master/protection: 422 Invalid request.
No subschema in "anyOf" matched.
0 must be greater than or equal to 1.
Not all subschemas of "allOf" matched.
For 'anyOf/1', {"dismiss_stale_reviews"=>false, "require_code_owner_reviews"=>false, "required_approving_review_count"=>0} is not a null. []
Adding --minapprove 0 doesnt help.
Adding --minapprove 1 does get past the error, but that also enables "Require status checks to pass before merging" without any status checks being selected.
I am trying to create a branch protection for master branch which uses all of the defaults. I can do this in the repo settings UI, e.g. only ticking "Include administrators", and leaving everything else unticked. This is useful because it leaves unticked "Allow force pushes" and "Allow deletions".
Adding
--minapprove 0doesnt help.Adding
--minapprove 1does get past the error, but that also enables "Require status checks to pass before merging" without any status checks being selected.