Skip to content

Commit 2823fb8

Browse files
authored
fix: ensure discussion title is quoted to increase match accuracy (#2165)
Signed-off-by: Adam Setch <adam.setch@outlook.com>
1 parent 848ae7e commit 2823fb8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/renderer/utils/api/graphql/utils.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ describe('renderer/utils/api/graphql/utils.ts', () => {
55
test('formats search query string correctly', () => {
66
const result = formatAsGitHubSearchSyntax('exampleRepo', 'exampleTitle');
77

8-
expect(result).toBe('exampleTitle in:title repo:exampleRepo');
8+
expect(result).toBe('"exampleTitle" in:title repo:exampleRepo');
99
});
1010
});
1111
});

src/renderer/utils/api/graphql/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ export function formatAsGitHubSearchSyntax(
22
repo: string,
33
title: string,
44
): string {
5-
return `${title} in:title repo:${repo}`;
5+
return `"${title}" in:title repo:${repo}`;
66
}

0 commit comments

Comments
 (0)