Skip to content

feat: try to get MR diff conent from local git before fetching from API

Tomas Vik requested to merge 265-diff-content-from-git into main

This MR is an optimisation of how we fetch the MR diff content.

The current implementation always reaches to the GitLab API (/api/v4/projects/${projectId}/repository/files/${encodedPath}/raw?ref=${ref}) to fetch the file content.

This MR prepends a step where we check the local git repository for the given version of the file. We fetch the file content from the API only if the local repository doesn't contain the file.

This MR contains 4 commits. The first 3 are small refactorings allowing for easier implementation of the main ~feature implemented in the fourth commit. I recommend reviewing the commits separately.

Related to #265 (closed)

Edited by Tomas Vik

Merge request reports