Repository navigation
fix(azure-devops): a work item's linked pull request opens in the app - #42936
ericfowler303 wants to merge 2 commits into
Conversation
Clicking a pull request under Linked pull requests on an Azure DevOps work item failed with "Change requests cannot be browsed for this project's host yet". The tracker named its repository `project/repository`, which clients open on the work item's host and the pull request service cannot key: Azure repository keys need the `_git` route and, on dev.azure.com, the organization. Name it the way the pull request URL spells it below the host, as the other trackers do: `organization/project/_git/repository`, or `project/_git/repository` on a legacy host. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Problem
Clicking a pull request under Linked pull requests on an Azure DevOps work item shows "Change requests cannot be browsed for this project's host yet." This happens even when the pull request's repository is checked out as a project. A link to the same pull request in a thread opens fine. Fixes #42934.
Change
The Azure tracker named a linked pull request's repository
project/repository. Web and mobile open the row on the work item's host with that repository, and the pull request service keys it ashost/repository. Azure's repository key needs the_gitroute and, ondev.azure.com, the organization, so no project matched.The tracker now names the repository the way the pull request's URL spells it below the host:
organization/project/_git/repository, orproject/_git/repositoryon a legacy*.visualstudio.comhost. That is the same convention the other trackers already follow (owner/repoon GitHub, the group path on GitLab). Changing the one producer fixes web, desktop and mobile. The row's label now shows that path for an Azure pull request.Scope
A bug fix, reported in #42934.
Verification
pullRequests.detailfailing inPullRequestService.canonicalRefwithPullRequestUnavailableErrorfrom the last branch ofrequireProject. The installed bundle's code at that line matches the source.AzureDevOpsIssueTracker.test.ts, in its existing cases: the detail test now expectsacme/Web App/_git/web. The legacy-organization test now keeps the work item's pull request link and expectsWeb App/_git/web. It also checks thatacme.visualstudio.com/<repository>canonicalizes todev.azure.com/acme/web%20app/_git/web, the key a checkout of that repository has. On main's tracker, 2 of the file's 10 tests fail, both on the old spelling: the legacy test getsWeb App/webwhere it expectsWeb App/_git/web, and the detail test getsWeb App/webwhere it expectsacme/Web App/_git/web. With the fix, all 10 pass.vp run check:changed upstream/mainpasses format, lint, knip, typecheck (11 packages) and tests.149dc85ecf) against a legacy*.visualstudio.comorganization: clicking a work item's linked pull request opens it in the side panel. The same click in 0.1.13 shows "Change requests cannot be browsed for this project's host yet."dev.azure.comorganization, and the mobile issue screen.Model: Claude Opus 5.5 (
claude-opus-5-5), harness: Claude Code.🤖 Generated with Claude Code