Skip to content

Add pagination support for ApprovalRules API

Vasilii Iakliushin requested to merge 31011_approval_rules_pagination into master

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

  1. Enable feature flag
    Feature.enable(:approval_rules_pagination)
  2. Create two approval rules for the project (Settings -> General -> Merge request approvals) http://127.0.0.1:3000/gitlab-org/gitlab-shell/edit
  3. Visit http://127.0.0.1:3000/api/v4/projects/gitlab-org%2Fgitlab-shell/approval_rules?per_page=1
  4. Visit http://127.0.0.1:3000/api/v4/projects/gitlab-org%2Fgitlab-shell/approval_rules?per_page=1&page=2
  5. 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.

Edited by Vasilii Iakliushin

Merge request reports

Loading