Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Allow basePath mapping to work with subdirectories (organizations, etc) #31

Open
IAmHughes opened this issue Mar 28, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@IAmHughes
Copy link

When utilizing the basePath mapping, I found a gap in the feature making this extension less ideal for my use cases. GitHub, as well as many other VCS (GitLab, etc) utilize an owner/repo paradigm over each repository. For example, this repository is sourcegraph/sourcegraph-open-in-vs-code.

The problem with the basePath as is, is that it only looks for the repository name for the folder and will not search subdirectories. In OSS, often one must fork the repository from an organization that owns the codebase into their personal projects. Additionally, I have repositories that are owned by an org with the same name as repositories owned by myself as a user. For example, iamhughes/docs and microsoft/docs may both exist. If these are both cloned into the same basePath, the folder names would conflict and therefore I couldn't have both at the same time.

My personal solution in the past has always been for my directories to look something like the following tree:

github/
|- iamhughes/
   |- my-repo/
   |- ansible/
   |- sourcegraph-open-in-vs-code/
|- ansible/
   |- ansible/
|- sourcegraph/
   |- sourcegraph-open-in-vs-code/
   |- sourcegraph/
|- microsoft/
   |- cool-repo/
gitlab/
|- ...

I'm hoping we can add functionality to support this paradigm of retaining the <owner>/<repo> syntax in folder directories, specifying a base folder path of something like /Users/iamhughes/github/repos/* and it would search through the directories in repos to locate the proper one based on the owner of the repository.

Ideally, if we could do something like #25 with a "per platform" approach we could set basePath as a default as well as for specific code hosts.

@IAmHughes IAmHughes added the enhancement New feature or request label Mar 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant