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
The method Repositories.UpdateRulesetClearBypassActor constructs a rulesetClearBypassActors instance with the BypassActors field left at its zero value. In Go, the zero value for a slice (such as []*BypassActor) is nil, not an empty slice. When serialized, a nil slice becomes null in JSON, which violates the GitHub API’s requirement for bypass_actors to be an array. As a result, the API returns a 422 error:
PUT https://api.github.com/repos/<organization>/<repo>/rulesets/<ruleset_id>: 422 Invalid request.
Invalid property /bypass_actors: data cannot be null. []