Defer breaking change: simplify branch protection default list options (!3002)

Summary

!3002 (merged) proposes changing DefaultBranchProtectionDefaultsOptions.AllowedToPush and AllowedToMerge from *[]*GroupAccessLevel to []*GroupAccessLevel (using Go 1.24+'s omitzero) to remove a pointer-indirection footgun and a panic risk when the lists are left unset.

This is a breaking change to the public API of the client and should not be introduced right now.

Why deferred

  • Field type change breaks existing callers building DefaultBranchProtectionDefaultsOptions today.
  • Needs to be scheduled for a version where breaking changes are acceptable (e.g. next major/minor per project versioning policy).

Next steps

  • Re-evaluate timing for landing !3002 (merged) (or a rebased equivalent) once breaking changes are acceptable.
  • Consider whether a non-breaking interim fix (e.g. nil-check before dereferencing in CreateGroup/UpdateGroup) can address the panic risk without changing the field type.

Related: !3002 (merged)

Edited by 🤖 GitLab Bot 🤖