Skip to content

Commit aae23cc

Browse files
Fixes #4776 - Azure DevOps Work Item autolinks point to wrong project
1 parent 619eb38 commit aae23cc

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
3939

4040
- Fixes performance of _Show Branches and Tags_ command
4141

42+
### Fixed
43+
44+
- Fixes [#4776](https://github.com/gitkraken/vscode-gitlens/issues/4776) Azure DevOps Work Item autolinks pointing to wrong project when the Work Item belongs to a different project in the same organization — thanks to [PR #4777](https://github.com/gitkraken/vscode-gitlens/pull/4777) by Daniel Asher ([@danielasher115](https://github.com/danielasher115))
45+
4246
## [17.7.0] - 2025-11-11
4347

4448
### Added

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,7 @@ A big thanks to the people that have contributed to this project 🙏❤️:
447447
- Jordon Kashanchi ([@jordonkash](https://github.com/JordonKash)) — [contributions](https://github.com/gitkraken/vscode-gitlens/commits?author=jordonkash)
448448
- JounQin ([@JounQin](https://github.com/JounQin)) — [contributions](https://github.com/gitkraken/vscode-gitlens/commits?author=JounQin)
449449
- Noritaka Kobayashi ([@noritaka1166](https://github.com/noritaka1166)) — [contributions](https://github.com/gitkraken/vscode-gitlens/commits?author=noritaka1166)
450+
- Daniel Asher ([@danielasher115](https://github.com/danielasher115)) — [contributions](https://github.com/gitkraken/vscode-gitlens/commits?author=danielasher115)
450451

451452
Also special thanks to the people that have provided support, testing, brainstorming, etc:
452453

src/git/remotes/azure-devops.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,10 @@ export class AzureDevOpsRemote extends RemoteProvider {
7070
}
7171

7272
protected override get issueLinkPattern(): string {
73-
const workUrl = this.baseUrl.replace(gitRegex, '/');
74-
return `${workUrl}/_workitems/edit/<num>`;
73+
if (isVsts(this.domain)) {
74+
return `${this.protocol}://${this.domain}/_workitems/edit/<num>`;
75+
}
76+
return `${this.protocol}://${this.domain}/${this.owner}/_workitems/edit/<num>`;
7577
}
7678

7779
private _autolinks: (AutolinkReference | DynamicAutolinkReference)[] | undefined;

0 commit comments

Comments
 (0)