azdo-userscripts
azdo-userscripts copied to clipboard
period shortcut for vscode.dev doesn't always open the same branch
When using the period shortcut to go from an Azure DevOps Repo to vscode.dev it doesn't always open the right branch. I'd guess it's because Azure DevOps doesn't always have the branch name in the URL. I think Azure DevOps only adds the branch name to the URL when you change it in the UI or use a link that contains the branch. Otherwise it always opens to the last branch you were viewing but doesn't add that to the URL even if it's not the main or default branch for the repo.
Thanks for opening your first issue here! Please refer to our support and troubleshooting docs.
OK will look at this!
Can you send me a link where it doesn't work if you press .
?
It's not a specific link but it's easy enough to reproduce. Essentially whenever you navigate to the repo with the "Files" button it resets the query parameters in the URL but not the branch you're viewing. So to reproduce:
- Create a new branch in a repo
- Add a file in the root of the repo so you can tell which branch you're on in VSCode.dev. Also add some content to the file, seems like VSCode.dev has issues with empty files which I've reported to them.
- Click the "Files" button again to clear the URL.
- Hit . to open in VSCode.dev and you should end up in the main branch.
- Go back to AzDO.
- Change the branch with the drop down at the top, notice that it's in the URL now.
- Go to VSCode.dev with the period shortcut, notice you're now in the branch.
I really thought there was a way in the VSCode.dev UI to see what branch you're on, but couldn't find it this time so I used the new file trick to tell the difference. Curious if you see another way to tell what branch it has open.
The "Files" nav button I'm referring to above: