diff --git a/CHANGELOG.md b/CHANGELOG.md index 9595418615fe9..6993464fca22c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p - Improves editor revision navigation ([#4200](https://github.com/gitkraken/vscode-gitlens/issues/4200)) +### Fixed + +- Fixes Incorrect PR Link Across Azure DevOps Projects ([#4207](https://github.com/gitkraken/vscode-gitlens/issues/4207)) + ## [17.0.1] - 2025-04-03 ### Added diff --git a/README.md b/README.md index bc8b6213dd41c..703d4e8a0e6b1 100644 --- a/README.md +++ b/README.md @@ -444,6 +444,7 @@ A big thanks to the people that have contributed to this project 🙏❤️: - Jean Pierre ([@jeanp413](https://github.com/jeanp413)) — [contributions](https://github.com/gitkraken/vscode-gitlens/commits?author=jeanp413) - Dawn Hwang ([@hwangh95](https://github.com/hwangh95)) — [contributions](https://github.com/gitkraken/vscode-gitlens/commits?author=hwangh95) - Emmanuel Ferdman ([@emmanuel-ferdman](https://github.com/emmanuel-ferdman)) — [contributions](https://github.com/gitkraken/vscode-gitlens/commits?author=emmanuel-ferdman) +- Jordon Kashanchi ([@jordonkash](https://github.com/JordonKash)) — [contributions](https://github.com/gitkraken/vscode-gitlens/commits?author=jordonkash) Also special thanks to the people that have provided support, testing, brainstorming, etc: diff --git a/src/plus/integrations/providers/azure/azure.ts b/src/plus/integrations/providers/azure/azure.ts index 6b55c5111a92c..aa9d41255894f 100644 --- a/src/plus/integrations/providers/azure/azure.ts +++ b/src/plus/integrations/providers/azure/azure.ts @@ -105,7 +105,7 @@ export class AzureDevOpsApi implements Disposable { const pr = prResult?.value.find(pr => pr.sourceRefName.endsWith(branch)); if (pr == null) return undefined; - return fromAzurePullRequest(pr, provider, owner, projectName); + return fromAzurePullRequest(pr, provider, owner); } catch (ex) { Logger.error(ex, scope); return undefined; diff --git a/src/plus/integrations/providers/azure/models.ts b/src/plus/integrations/providers/azure/models.ts index dea135e4d91b8..fdb44da3ad3ec 100644 --- a/src/plus/integrations/providers/azure/models.ts +++ b/src/plus/integrations/providers/azure/models.ts @@ -472,12 +472,7 @@ function fromAzureUserToMember(user: AzureUser, _type: 'issue' | 'pullRequest'): }; } -export function fromAzurePullRequest( - pr: AzurePullRequest, - provider: Provider, - orgName: string, - projectName: string, -): PullRequest { +export function fromAzurePullRequest(pr: AzurePullRequest, provider: Provider, orgName: string): PullRequest { const url = new URL(pr.url); return new PullRequest( provider, @@ -531,7 +526,7 @@ export function fromAzurePullRequest( undefined, { id: pr.repository?.project?.id, - name: projectName, + name: pr.repository.project.name, resourceId: '', // TODO: This is a workaround until we can get the org id here. resourceName: orgName, },