Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Pull Request URLs are incorrect for repositories with "limited refs" enabled #244

Closed
hross opened this issue May 26, 2017 · 3 comments
Closed
Labels

Comments

@hross
Copy link

hross commented May 26, 2017

I noticed that all of the PR URLs generated from the extension are wrong (separate PR in flight to fix that).

As part of that, the reason is we check urls like this:

https://mseng.visualstudio.com/VSOnline/_git/VSO/vsts/info

Which gives back a remoteUrl that contains a non-limited ref version of the repository URL... i.e. /_git/_full/.

This is okay in certain instances but we also use it to generate URLs for version control, which are wrong because they have _full in them, which is interpreted as project name.

I'm not sure of the implications but you could just replace /_git/_full/ with /_git/ in RepositoryInfo.ts:

     if (typeof repositoryInfo === "object") {
            repositoryUrl = repositoryInfo.repository.remoteUrl;

I didn't do that because I wasn't sure of the implications, so I filed this issue instead.

@jeffyoung
Copy link
Contributor

I'm a bit confused @hross. Did something on the server break compatibility/change? Is that what you're referring to? I'll have to look into it but if you've got more details, that'd be helpful.

@jeffyoung jeffyoung changed the title We are using _full as the base URL for a git repo, which is probably wrong... Pull Request URLs are incorrect for repositories with "limited refs" enabled May 31, 2017
@jeffyoung jeffyoung added the bug label May 31, 2017
@jeffyoung
Copy link
Contributor

The upshot here is that the pull request URLs are incorrect for repositories that have the "limited refs" capability enabled. Here's a document I found talking about limited refs.

@jeffyoung
Copy link
Contributor

Addressed this in v1.119.0.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants