refactor: improve types in the frontend, misc fixes (#39142)

This commit is contained in:
silverwind
2026-08-31 04:12:25 -07:00
committed by GitHub
parent 535fc29ae8
commit 7c93ead628
46 changed files with 392 additions and 217 deletions
+2 -2
View File
@@ -71,11 +71,11 @@ export async function matchMention(mentionsUrl: string, queryText: string): Prom
return sortAndReduce(results);
}
export async function matchIssue(owner: string, repo: string, issueIndexStr: string, query: string, signal: AbortSignal): Promise<Issue[]> {
export async function matchIssue(owner: string, repo: string, issueIndexStr: string | undefined, query: string, signal: AbortSignal): Promise<Issue[]> {
const res = await GET(`${window.config.appSubUrl}/${owner}/${repo}/issues/suggestions?q=${encodeURIComponent(query)}`, {signal});
const issues: Issue[] = await res.json();
const issueNumber = parseInt(issueIndexStr);
const issueNumber = parseInt(issueIndexStr || '');
// filter out issue with same id
return issues.filter((i) => i.number !== issueNumber);