Skip to content

Commit b52258e

Browse files
fix(shared): preserve Azure link identity during port matching
1 parent 3e8a796 commit b52258e

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎packages/shared/src/changeRequestUrl.ts‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,9 @@ export function parseChangeRequestUrl(targetUrl: string): ChangeRequestLink | nu
5151
// Azure DevOps Server can use any hostname; its `_git` pull request route identifies it.
5252
const azure = /^\/((?:[^/]+\/)*_git\/[^/]+)\/pullrequest\/(\d+)(?:\/|$)/u.exec(url.pathname);
5353
const link = claim(url, azure);
54-
return link === null || url.port === "" ? link : { ...link, authority: url.host.toLowerCase() };
54+
return link === null || url.port === ""
55+
? link
56+
: { ...link, host, authority: url.host.toLowerCase() };
5557
}
5658

5759
function claim(url: URL, match: RegExpExecArray | null): ChangeRequestLink | null {

0 commit comments

Comments
 (0)