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
- We created
GitLabProjectRepository.getSelectedOrDefaultForRepositoryLegacy
that returnsProjectInRepository
and callsgitExtensionWrapper.getRepository
under the hood. - We replaced all calls to
gitExtensionWrapper.getRepository
withGitLabProjectRepository.getSelectedOrDefaultForRepositoryLegacy
- We changed all the TreeView-related logic to use
ProjectInRepository
instead ofWrappedRepository
.
Related to #558 (closed)
Edited by Tomas Vik (OOO back on 2024-09-23)