Skip to content

Directly open github repo through repo link #1355

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

Closed
JalinWang opened this issue Feb 12, 2020 · 5 comments
Closed

Directly open github repo through repo link #1355

JalinWang opened this issue Feb 12, 2020 · 5 comments
Labels
enhancement Some improvement that isn't a feature

Comments

@JalinWang
Copy link

I'm very fond of Gitpod, which supports opening a GitHub repo by prefixing any public GitHub or GitLab URL with gitpod.io/# in the browser.
e.g.: https://www.gitpod.io/#https://github.com/cdr/code-server

I want to add this feature to this project but have no idea how and where to start.
My initial thought is to add a rule to the URL parser in the patch, once the URL matched, execute "git clone" and then open.
But later I realized this feature requires git, would it be better to implement this feature as an extension? If yes, use UriHandler API?
or any other better solution?

@nhooyr nhooyr added the enhancement Some improvement that isn't a feature label Feb 12, 2020
@code-asher
Copy link
Member

This would be cool. I don't think we'd need to patch anything to get it working. Maybe if the ?folder parameter is something like git://github.com/cdr/code-server URL we clone before starting VS Code. We need to fix #1294 first though.

@JalinWang
Copy link
Author

JalinWang commented Feb 14, 2020

Is it a good way to execute "git clone" in server.preHandleRequest() and then modify MainServer.handleRequest() to call getRoot() with proper path?
Pass a repo link in a form like http://code-server-domain.com/github?xxxxx
P.S.:
class Server and class MainServer refer to the ones in https://github.com/cdr/code-server/blob/master/src/node/server.ts

@code-asher
Copy link
Member

code-asher commented Feb 14, 2020 via email

@dougnukem
Copy link

Sail by coder supports this use case with the browser extension:

@kylecarbs
Copy link
Member

Closing for now.

We don't have immediate plans for this within code-server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Some improvement that isn't a feature
Projects
None yet
Development

No branches or pull requests

5 participants