feat: Create Repositories::CommitsFinder for Commits API pagination

Why

The Commits API endpoint (lib/api/commits.rb) contains ~40 lines of inline pagination logic. This finder extracts that logic into a reusable class following the established TreeFinder pattern, preparing for integration with GitalyKeysetPager in subsequent phases. Actual usage will be in future MR.

What

  • New Repositories::CommitsFinder
  • Supports both offset pagination and keyset/Gitaly pagination
  • Validates unsupported keyset parameters (path, first_parent, order, trailers, follow)
  • Handles --all pseudo-revision and empty/non-existent repositories

Closes: Create CommitsFinder class for Commits API (#595506 - closed)

Part of the epic: Refactor Commits API to use standard keyset pag... (gitlab-org#21573)

Edited by Hunter Stewart

Merge request reports

Loading