refactor: rename objects representing workspace
This prevents confusion between the terms "GitLab project" and "VS Code workspace". The current legacy naming that uses the name "project" to represent VS Code workspace is diverging from an established naming and confuses contributors
Examples of where this caused confusion
GitLabService
-
fetchCurrentProject
returned a GitLab project fetched from the API -
getAllGitlabProjects
returned a list of workspaces
StatusBar
tests
gitLabService.fetchCurrentPipelineProject.mockReturnValue(project);
These tests were using project
which was actually a workspace. The tests were passing because the production logic only checks that the fetchCurrentPipelineProject()
method returns something. But the tests were confusing.
MrItemModel
This assignment now makes much more sense:
- workspaceFolder: this.project.uri,
+ workspaceFolder: this.workspace.uri,
Edited by Tomas Vik