Add diff stats endpoint

Summary

Adds GET /projects/:id/repository/diff_stats, returning per-file additions and deletions counts between two refs via the Gitaly DiffStats RPC. Gated behind an off-by-default beta feature flag, repository_diff_stats_api.

Closes #599034 (closed)

What does this MR do?

  • Adds the diff stats endpoint, paginated, authorized via the read_repository_comparison project permission
  • Gates the endpoint behind the repository_diff_stats_api beta flag (route_setting :lifecycle, :beta), off by default, matching the sibling blobs/batch and diverging_commits endpoints from the same epic. Rollout issue: #617089
  • Removes the Premium licensed feature gating this MR originally carried, no EE code remains
  • Adds request specs and a doc/api/repositories.md section
  • Regenerates OpenAPI and granular token permission documentation
  • No changelog entry, since the flag is default off
  • Part of the epic gitlab-org#21900
Edited by Mustafa Bayar

Merge request reports

Loading
Loading