Skip to content

Move general merge request tools out of the diffs-specific app

What does this MR do and why?

What

This MR moves some constants and utilities out of the /diffs app folder to a higher-level /code_review folder.

Please note: there is no new code here, it's all moves.

Old home ...is now
~/diffs/utils/merge_request.js ~/code_review/utils/merge_request.js
~/diffs/constants.js ~/code_review/constants.js

Associated tests have also been moved, and all imports have been updated.

Keep in mind that some things from the ~/diffs directory remained, which is why these aren't just file moves. There are some things specific to the Diffs app which should remain in place.

Why

The groupcode review team is progressively writing more and more code that is not isolated to a single app.
For example: in this MR, you can see that the getDerivedMergeRequestInformation function is not specific to diffs.
It can be used anywhere you have Merge Request information.

There are more of these higher-level general "code review" changes coming that aren't scoped to just Diffs (or any other sub-app on the Merge Request page), so we should move these general utilities and code assets away from being app-specific.

Screenshots or screen recordings

This is entirely refactoring.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Thomas Randolph

Merge request reports