feat!: Use `omitzero` for `BypassActors` to support handling empty arrays by maishivamhoo123 · Pull Request #3891 · google/go-github
BREAKING CHANGE: UpdateRepositoryRulesetClearBypassActor, UpdateRepositoryRulesetClearBypassActor, UpdateRulesetClearBypassActor, and UpdateRulesetNoBypassActor have been removed as they are no longer needed.
Fixes #3859
With the release of Go 1.24, this PR updates the RepositoryRuleset struct to use the omitzero tag. This allows the API to differentiate between a nil slice (do not update) and an empty slice (clear values) without needing separate workaround structs.
Changes
- Updated
RepositoryRuleset.BypassActorsto useomitzeroinstead ofomitempty. - Removed the now-redundant workaround structs:
rulesetNoOmitBypassActorsrulesetClearBypassActors
- Removed the now-redundant workaround functions (the standard
UpdateRulesetcan now handle clearing actors via an empty slice):UpdateRulesetClearBypassActorUpdateRulesetNoBypassActor
This PR relies on the recent linter updates merged to support the omitzero tag._