Add new scope for branch rules pagination

What does this MR do and why?

Adds a new scope to help paginate through protected branches in a specific order. Finds all protected branches that come after a given branch when sorted alphabetically by name, with ID as a tiebreaker for branches with the same name.

References

Related to #576206

Changes needed for pagination:

  1. Add new scope for branch rules pagination (!212621 - merged) <- you are here
  2. Add new finder for branch rules pagination (!212623)
  3. Add pagination to graphql branch rules (!212624)

Draft poc MR where you can see the scope in use: !211451

Query Plan

https://console.postgres.ai/gitlab/gitlab-production-main/sessions/45536/commands/139576

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Gavin Hinfey

Merge request reports

Loading