Add support for pagination to Gitlab::Git::Finders::RefsFinder

What does this MR do and why?

Contributes to #419417 (closed)

Problem

Add pagination support to Gitaly's `ListRefs` RPC (#419418 - closed) added a pagination support for Gitaly, but RefsFinder doesn't use it.

Solution

Add support for pagination

References

Add pagination support to Gitlab::Git::Finders:... (#419417 - closed)

How to set up and validate locally

  1. Switch to the branch 419417-add-pagination-support-refs-finder
  2. Open a Rails console
  3. Test pagination options
repo = Project.first.repository

# Limit number of results
Gitlab::Git::Finders::RefsFinder.new(repo, ref_type: :branches, per_page: 5).execute

# Fetch by page token
Gitlab::Git::Finders::RefsFinder.new(repo, ref_type: :branches, per_page: 5, page_token: 'refs/heads/PyPi').execute

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.

Related to #419417 (closed)

Edited by Vasilii Iakliushin

Merge request reports

Loading