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

Add support for URL vscode://gitclone/<path> to do a git clone of the specified repository and open it #20291

Closed
StanislawStempin opened this issue Feb 9, 2017 · 8 comments
Labels
extensions Issues concerning extensions feature-request Request for new features or functionality
Milestone

Comments

@StanislawStempin
Copy link

I would like to be able to achieve the following scenario using URL handlers for VS Code, giving a quick start for any new developers interested in developing using my extension. This issue is about step 2:

//1. Install VS Code - https://code.visualstudio.com/download
2. Clone a git hub repository with sample source code - vscode://gitclone/https/github.com/Microsoft/AL/
//3. Install extension - vscode://extension/microsoft.al

Step 3 seems to be supported but doesn't work - see #20289

@Tyriar Tyriar added the extensions Issues concerning extensions label Feb 9, 2017
@joaomoreno joaomoreno added the feature-request Request for new features or functionality label Feb 10, 2017
@joaomoreno
Copy link
Member

Good idea!

@joaomoreno joaomoreno added this to the Backlog milestone Feb 10, 2017
@jordanmkasla2009
Copy link
Contributor

jordanmkasla2009 commented Feb 12, 2017

This idea could be normalized to something like
vscode:git/clone?repo=https%3A%2F%2Fgithub.com%2FMicrosoft%2FAL%2F&outPath=path%2Fto%2Fproject
though the url encoding might not be necessary.

or even some sort of API for extensions to hook into the URLService something along the lines of vscode:extension-short-name/command?query=params

@hoovercj
Copy link
Member

hoovercj commented Apr 7, 2017

@joaomoreno How could I even begin to experiment with solutions for this?

As a very basic experiement, I tried to add an additional handler in extensionsWorkbenchService, but nothing gets to the debug version of code. If I click on a link such as <a href=the "vscode:git/clone?url" I never hit debug points (even in the exisitng extension protocol handler with a link that should work) and nothing happens. I assume this is because the actual vscode installation receives the URL, not vscode window that I'm running from source.

What do you or the tema do to the test this/what did you do while developing it?

Thanks!

@joaomoreno
Copy link
Member

joaomoreno commented Apr 10, 2017

Correct @hoovercj. Here's the only handler.

This is now much harder... since Git is an extension. So, needs thought.

@Thaina
Copy link

Thaina commented Jun 14, 2017

@joaomoreno I think we could generalized this by allowing url vscode://extensions/extension.id/SomeThing can pass the relative path to extension endpoint. And each extension could write a handler to do custom work

vscode://extensions/git/clone?url=githubURL

git extension would get "/clone?url=githubURL" to some endpoint

And if that extension was not installed then it would fallback to vscode://extensions/extension.id

@Thaina
Copy link

Thaina commented May 4, 2018

Seem like general protocol handler supported #46256

https://code.visualstudio.com/updates/v1_23#_protocol-handler-api

Just make it work in git extension then?

@hoovercj
Copy link
Member

hoovercj commented May 4, 2018

@StanislawStempin does the new git clone uri support meet your needs?

@StanislawStempin
Copy link
Author

Perfect! That covers it

@vscodebot vscodebot bot locked and limited conversation to collaborators Jun 22, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
extensions Issues concerning extensions feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

6 participants