-
Notifications
You must be signed in to change notification settings - Fork 0
Description
GitLab allows organizations to group repositories into groups. Groups can also be nested. This is the format:
https://gitlab.com/<org_name>/<parent_group>/<child_group>/<repo_name>
Example repo in a group:
https://gitlab.com/gitlab-org/charts/knative
Where gitlab-org is the organization, charts is the group, and knative is the repo.
This is not currently supported by switch. We'd need a way to add custom paths into the url resolution. This path structure is not strictly a GitLab concept (it's actually a git concept) but GitLab is the first time I've come across a cloud-based repository url structure like this.
The repo url is currently built like this:
$PLATFORM_URL/$ORG_NAME/${REPO_NAME}.git
We would need to add in an extra variable referencing the group hierarchy:
$PLATFORM_URL/$ORG_NAME/<group_hierarchy>/${REPO_NAME}.git
And the group hierarchy would need to be set in the cli for at least the first time switching to any given repo.
Considerations:
- Is the group hierarchy something that you'd want to save along-side the org name so that switching to other repos in the same org and group is quicker?
- Is this only relevant for switching to a repo that you haven't already cloned? Or do you need to specify the group hierarchy every time you switch to a repo that's in a group?
- Should the repos still be saved in the same directories or should we introduce new directories to reflect the group hierarchy?
- What should the cli option be?
More information on GitLab Groups: https://docs.gitlab.com/ee/user/group/
GitHub has a Teams feature but as far as I can tell it does not affect repo paths.