You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All of those fields are documented as required at
https://developer.github.com/v3/repos/branches/#update-branch-protection.
In google#512, we changed the API to better reflect that. However, it should
still be documented that the fields are required. This is consistent
with the other required fields that are also documented as required.
Additionally, note that empty slices must be non-nil. From running
integration tests, I've seen that passing nil slices (which get encoded
as null via encoding/json) resulted in invalid request errors such as:
No subschema in "anyOf" matched.
For 'properties/users', nil is not an array.
For 'properties/teams', nil is not an array.
Not all subschemas of "allOf" matched.
For 'anyOf/1', {"users"=>nil, "teams"=>nil} is not a null. []
Follows google#512.
0 commit comments