From 737ce47efc52cee3df1ef4eaee9904d64824f9cb Mon Sep 17 00:00:00 2001 From: Adam Setch Date: Tue, 19 Aug 2025 13:55:04 -0400 Subject: [PATCH] fix: ensure discussion title is quoted to increase match accuracy Signed-off-by: Adam Setch --- src/renderer/utils/api/graphql/utils.test.ts | 2 +- src/renderer/utils/api/graphql/utils.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/renderer/utils/api/graphql/utils.test.ts b/src/renderer/utils/api/graphql/utils.test.ts index 06155f1ba..74ba02cb9 100644 --- a/src/renderer/utils/api/graphql/utils.test.ts +++ b/src/renderer/utils/api/graphql/utils.test.ts @@ -5,7 +5,7 @@ describe('renderer/utils/api/graphql/utils.ts', () => { test('formats search query string correctly', () => { const result = formatAsGitHubSearchSyntax('exampleRepo', 'exampleTitle'); - expect(result).toBe('exampleTitle in:title repo:exampleRepo'); + expect(result).toBe('"exampleTitle" in:title repo:exampleRepo'); }); }); }); diff --git a/src/renderer/utils/api/graphql/utils.ts b/src/renderer/utils/api/graphql/utils.ts index 6cc36a0d7..7e07ec28f 100644 --- a/src/renderer/utils/api/graphql/utils.ts +++ b/src/renderer/utils/api/graphql/utils.ts @@ -2,5 +2,5 @@ export function formatAsGitHubSearchSyntax( repo: string, title: string, ): string { - return `${title} in:title repo:${repo}`; + return `"${title}" in:title repo:${repo}`; }