From df36c83b76d7cc71dcf281eeeb6f0ff8f879af2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Mon, 18 Aug 2025 16:47:44 -0400 Subject: [PATCH] fix some issue/pull URLs in javascript --- web_src/js/types.ts | 1 + web_src/js/utils.ts | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/web_src/js/types.ts b/web_src/js/types.ts index d233eba24f..6f7803c813 100644 --- a/web_src/js/types.ts +++ b/web_src/js/types.ts @@ -24,6 +24,7 @@ export type RepoOwnerPathInfo = { export type IssuePathInfo = { ownerName: string, repoName: string, + group: string, pathType: string, indexString: string, }; diff --git a/web_src/js/utils.ts b/web_src/js/utils.ts index 23bddc3b1c..282ab1f27e 100644 --- a/web_src/js/utils.ts +++ b/web_src/js/utils.ts @@ -63,8 +63,8 @@ export function urlQueryEscape(s: string) { export function parseIssueHref(href: string): IssuePathInfo { // FIXME: it should use pathname and trim the appSubUrl ahead const path = (href || '').replace(/[#?].*$/, ''); - const [_, ownerName, repoName, pathType, indexString] = /([^/]+)\/([^/]+)\/(issues|pulls)\/([0-9]+)/.exec(path) || []; - return {ownerName, repoName, pathType, indexString}; + const [_, ownerName, group, repoName, pathType, indexString] = /([^/]+)\/(?:group\/([^/]+)\/)?([^/]+)\/(issues|pulls)\/([0-9]+)/.exec(path) || []; + return {ownerName, repoName, pathType, group, indexString}; } export function parseRepoOwnerPathInfo(pathname: string): RepoOwnerPathInfo {