Skip to content

Commit 8a2003e

Browse files
authored
Link provider - issues is being opened on the browser instead of VS Code (#7269)
Fixes #7003
1 parent 7abeefa commit 8a2003e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/github/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ export function convertRESTHeadToIGitHubRef(head: OctokitCommon.PullsListRespons
309309

310310
async function transformHtmlUrlsToExtensionUrls(body: string, githubRepository: GitHubRepository): Promise<string> {
311311
const issueRegex = new RegExp(
312-
`href="https?:\/\/${escapeRegExp(githubRepository.remote.gitProtocol.url.authority)}\\/${escapeRegExp(githubRepository.remote.owner)}\\/${escapeRegExp(githubRepository.remote.repositoryName)}\\/(issues|pull)\\/([0-9]+)"`);
312+
`href="https?:\/\/${escapeRegExp(githubRepository.remote.gitProtocol.url.authority)}\\/${escapeRegExp(githubRepository.remote.owner)}\\/${escapeRegExp(githubRepository.remote.repositoryName)}\\/(issues|pull)\\/([0-9]+)"`, 'g');
313313
return stringReplaceAsync(body, issueRegex, async (match: string, issuesOrPull: string, number: string) => {
314314
if (issuesOrPull === 'issues') {
315315
return `href="${(await toOpenIssueWebviewUri({ owner: githubRepository.remote.owner, repo: githubRepository.remote.repositoryName, issueNumber: Number(number) })).toString()}""`;

0 commit comments

Comments
 (0)