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 Azure DevOps (formerly VSTS) #501

Closed
eamodio opened this Issue Sep 11, 2018 · 7 comments

Comments

Projects
None yet
2 participants
@eamodio
Owner

eamodio commented Sep 11, 2018

URLs will be changed from abc.visualstudio.com to dev.azure.com/abc

@eamodio eamodio self-assigned this Sep 11, 2018

@eamodio eamodio added this to the Soon™ milestone Sep 30, 2018

@ejdaly

This comment has been minimized.

ejdaly commented Nov 30, 2018

Note: the following url patterns work when setting up Azure DevOps via "gitlens.remotes"

{
	"domain": "ssh.dev.azure.com",
	"type": "Custom",
	"name": "Azure DevOps",
	"protocol": "ssh",
	"urls": {
		"repository": "https://dev.azure.com/<organization>/<project>/_git/<repo_short_name>",
		"branches": "https://dev.azure.com/<organization>/<project>/_git/<repo_short_name>/branches",
		"branch": "https://dev.azure.com/<organization>/<project>/_git/<repo_short_name>?version=GB${branch}",
		"commit": "https://dev.azure.com/<organization>/<project>/_git/<repo_short_name>/commit/${id}",
		"file": "https://dev.azure.com/<organization>/<project>/_git/<repo_short_name>?path=/${file}",
		"fileInBranch": "https://dev.azure.com/<organization>/<project>/_git/<repo_short_name>?path=${file}&version=GB${branch}",
		"fileInCommit": "https://dev.azure.com/<organization>/<project>/_git/<repo_short_name>/commit/${id}?_a=compare&path=/${file}",
		// "fileLine": "#L${line}",
		// "fileRange": "#L${start}-L${end}"
	}
}

Using a visualstudio.com domain didn't work for me at all (even when selecting "Custom" type).

In remotes/factory.ts, there is a search for "visualstudio.com" in the domain, which marks the remote as VSTS, and the Custom type is not used in this case? I found that a little confusing since VSTS is not an acceptable "type" in the gitlens.remote configuration.

So basically, visualstudio.com domains are not working at all for me (if I want a Custom remote configuration, which is needed particularly for SSH connections). But dev.azure.com domains will work, by being set up as a fully custom remote...

@eamodio

This comment has been minimized.

Owner

eamodio commented Nov 30, 2018

Can you try out the GitLens 9 beta and see if you are experiencing the same issues?

@ejdaly

This comment has been minimized.

ejdaly commented Dec 1, 2018

I think everything is good in 9 beta, thanks.

The new SSH url for Azure DevOps is like: git@ssh.dev.azure.com:v3/<organization>/<project>/<repo>

, so that's not being automatically identified
(in the defaultProviders array in /src/git/remotes/factory.ts --- the match is looking for exactly "dev.azure.com").

But when using the new HTTPS url for Azure DevOps
(which looks like https://<user>@dev.azure.com/<org>/<project>/_git/<repo>)
, everything is picked up correctly (automatically), and the "Open X in Remote" links work correctly etc..

Adding "ssh.dev.azure.com" as a recognized url for Azure might just make everything work automatically..? (if not, then there still is a documented solution using the Custom type...)

Thanks
(beta 9 looks great btw 👍 )

@eamodio

This comment has been minimized.

Owner

eamodio commented Dec 1, 2018

@ejdaly Awesome, thanks for the info. I will change the matching to support the ssh url as well.

Thanks 😄

@ejdaly

This comment has been minimized.

ejdaly commented Dec 1, 2018

Cool. I'll watch for updated releases, and can test the next beta binary for SSH and let you know...
Thanks :)

@eamodio eamodio closed this in 1d36b80 Dec 2, 2018

@eamodio

This comment has been minimized.

Owner

eamodio commented Dec 4, 2018

@ejdaly GitLens 9 is out -- let me know if this works out of the box for you now

@ejdaly

This comment has been minimized.

ejdaly commented Dec 6, 2018

It's recognizing the remote url "ssh.dev.azure.com" as an Azure repo, but then if I click "view X on remote", it's going to (e.g.)

https://ssh.dev.azure.com/v3/<org>/<project>/<repo>/commit/8c5b.../?_a=contents&path=/app/main.js

instead of:
https://dev.azure.com/<org>/<project>/<repo>/commit/8c5b.../?_a=contents&path=/app/main.js

(just drop the "ssh." and "/v3")

@eamodio eamodio reopened this Dec 6, 2018

@eamodio eamodio closed this in d64a1f8 Dec 12, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment