git-open
git-open copied to clipboard
Azure DevOps (which replaces Visual Studio Team Services) doesn't work.
Docs say Visual Studio Team Services are supported, but since that's not an available product anymore, that's no longer really accurate. I never used VSTS, and maybe the MS-provided URL redirection is still working for repos cloned with a visualstudio.com
URL.
The Azure DevOps URLs will definitely need some special handling; see below.
If an incorrect URL is opened, please provide the following so we can write a test:
Example clone url:
https: https://[email protected]/thomastaylor0772/friends-with-boats/_git/friends-with-boats
ssh: [email protected]:v3/thomastaylor0772/friends-with-boats/friends-with-boats
Example branch name:
testing
Expected web URL:
For base git repo: https://dev.azure.com/thomastaylor0772/_git/friends-with-boats
For a branch: https://dev.azure.com/thomastaylor0772/_git/friends-with-boats?path=%2F&version=GBtesting&_a=contents
The path
and _a
params are optional - I included them as they're inserted when navigating to a branch in the Azure DevOps web interface, but
https://dev.azure.com/thomastaylor0772/_git/friends-with-boats?version=GBtesting
works fine, similar to how VSTS/TFS are currently handled.
For an issue (issue # 1): https://dev.azure.com/thomastaylor0772/friends-with-boats/_workitems/edit/1/
Maybe this would work currently if the remote is set for https, but SSH remote definitely doesn't work. I tried to get it sorted with
> git config --global "open.https://ssh.dev.azure.com.domain" "dev.azure.com"
but the :v3
in the SSH url and the lack of a _git
token kept that from working.
Another example:
<org>@vs-ssh.visualstudio.com:v3/<org>/<project>/<repo>
on the branch feature/whatever
needs to get turned into
https://dev.azure.com/<org>/<project>/_git/<repo>?version=GBfeature%2Fwhatever
(so the branch has to be url encoded)