Skip to content

refactor: rename GitLabRemote related class and properties

Tomas Vik requested to merge rename-remote into main

This MR refactors the GitRemote interface and its uses.

The GitRemote interface, in fact, represents GitLabRemote. It's a subset of all potential git remote URLs.

Also, the project property was confusing since "project" is an overloaded term in this extension project (pun intended 🥁).

The combination of project namespace (e.g. gitlab-org) and path (e.g. gitlab-vscode-extension) is used so often throughout the extension that this MR gives it a special name namespaceWithPath.

We call the combination path_with_namespace in our REST API, but I couldn't make myself keep that naming which switches the order.

Why is this such a shotgun surgery? 🔫

We are currently centring the extension around repository, which means that the repository details like remote URL leak throughout the app because that's how we say which project to use.

There is a better way. We'll center our logic around GitLab projects: #558 (closed). This refactoring will help with that.

Edited by Tomas Vik

Merge request reports