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.BypassActors to use omitzero instead of omitempty.
  • Removed the now-redundant workaround structs:
    • rulesetNoOmitBypassActors
    • rulesetClearBypassActors
  • Removed the now-redundant workaround functions (the standard UpdateRuleset can now handle clearing actors via an empty slice):
    • UpdateRulesetClearBypassActor
    • UpdateRulesetNoBypassActor

This PR relies on the recent linter updates merged to support the omitzero tag._