Skip to content

refactor: migrate TreeView and MR review to the new model

Similarly to !519 (merged), this MR migrates all TreeView-related logic to use the new model (instead of the WrappedRepository, we use the ProjectInRepository). This MR still uses the convertRepositoryToProject method to translate from the old model to the new one to keep consistency.

This is the last step before replacing the old model with the new one.

I saw space for improvement in most of the code I touched, but I tried to keep refactoring to a minimum and focus on replacing the model. Even with this focus, this MR turned out to be rather large.

Implementation in a nutshell

  1. We created GitLabProjectRepository.getSelectedOrDefaultForRepositoryLegacy that returns ProjectInRepository and calls gitExtensionWrapper.getRepository under the hood.
  2. We replaced all calls to gitExtensionWrapper.getRepository with GitLabProjectRepository.getSelectedOrDefaultForRepositoryLegacy
  3. We changed all the TreeView-related logic to use ProjectInRepository instead of WrappedRepository.

Related to #558 (closed)

Edited by Tomas Vik (OOO back on 2024-09-23)

Merge request reports