Implement diff_file endpoints
What does this MR do and why?
Implement diff_file endpoints
This adds diff_file
endpoint for each resource that
we support in rapid diffs (e.g. MergeRequest
, Commit
and
Compare
).
This is behind rapid_diffs
FF.
References
Screenshots or screen recordings
Before | After |
---|---|
How to set up and validate locally
- Enable the rapid diffs feature flags:
Feature.enable(:rapid_diffs)
Feature.enable(:rapid_diffs_on_mr_creation)
Feature.enable(:rapid_diffs_on_mr_show)
Feature.enable(:rapid_diffs_on_commit_show)
Feature.enable(:rapid_diffs_on_compare_show)
-
You can use a project that has a
README.md
so it's easy to appendrapid_diffs=true&old_path=README.md&new_path=README.md
the below URLs to test -
Test the endpoint for each resource:
/projects/:project_id/merge_requests/:merge_request_id/diff_file?
/projects/:project_id/commit/:id/diff_file?
/projects/:project_id/merge_requests/new/diff_file?
/projects/:project_id/compare/diff_file?from=:version&to=:version&
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 #506168 (closed)
Edited by Olaoluwa Oluro