Add pagination support for ApprovalRules API
What does this MR do and why?
Contributes to #31011
Add pagination support for Project and Merge Request approval rules API
How to set up and validate locally
- Enable feature flag
Feature.enable(:approval_rules_pagination)
- Create two approval rules for the project (Settings -> General -> Merge request approvals) http://127.0.0.1:3000/gitlab-org/gitlab-shell/edit
- Visit http://127.0.0.1:3000/api/v4/projects/gitlab-org%2Fgitlab-shell/approval_rules?per_page=1
- Visit http://127.0.0.1:3000/api/v4/projects/gitlab-org%2Fgitlab-shell/approval_rules?per_page=1&page=2
- You should see one approval rule per page
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Vasilii Iakliushin