Loading
Add changed paths endpoint
Summary
Adds a changed paths endpoint to the Repositories API, behind a feature flag.
Closes #599029 (closed)
What does this MR do?
- Adds
GET /projects/:id/repository/changed_paths, which lists every path that differs between two refs along with its change status and file modes, with rename detection available through afind_renamesparameter, and paginated results. - Calls the Gitaly
FindChangedPathsRPC throughGitlab::Git::DiffTree, passing the refs directly so a single Gitaly call resolves and diffs them. - Gated behind the off by default beta feature flag
repository_changed_paths_api, withroute_setting :lifecycle, :beta. Rollout issue: #605935 - Authorized through the
read_repository_comparisonproject permission. - Returns 404 only when ref resolution fails. A saturated or slow Gitaly raises
ResourceExhaustedErrororCommandTimedOut, which propagate instead of being reported as a missing ref. - Adds request specs, a
doc/api/repositories.mdsection, and regenerated OpenAPI and granular token permission documentation.
No changelog entry, since the feature flag is off by default.
Part of the epic gitlab-org#21900
Edited by Mustafa Bayar