Skip to content

Commit c858df8

Browse files
committed
Address second round of Copilot review comments on PR #120
- output.ts: shell-quote --org arg in buildReplayCommand for safety (org names with spaces/metacharacters could break the replay command) - output.test.ts: update --org assertion to expect quoted value - docs/usage/filtering.md: reword intro from 'pre-query filtering options' to 'result filtering options' since --include-archived and --exclude-template-repositories act after fetching, not before
1 parent 636b7be commit c858df8

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

docs/usage/filtering.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Filtering
22

3-
`github-code-search` provides four pre-query filtering options so you can exclude noise before results ever appear in the TUI or output.
3+
`github-code-search` provides four result filtering options so you can exclude noise from what appears in the TUI or output.
44

55
## `--exclude-repositories`
66

src/output.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ describe("buildReplayCommand", () => {
8484
const groups = [makeGroup("myorg/repoA", ["a.ts"])];
8585
const cmd = buildReplayCommand(groups, QUERY, ORG, new Set(), new Set());
8686
expect(cmd).toContain(`github-code-search`);
87-
expect(cmd).toContain(`--org ${ORG}`);
87+
expect(cmd).toContain(`--org '${ORG}'`);
8888
expect(cmd).toContain(`--no-interactive`);
8989
});
9090

src/output.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@ export function buildReplayCommand(
5252
): string {
5353
const { format, outputType, includeArchived, excludeTemplates, groupByTeamPrefix, regexHint } =
5454
options;
55-
const parts: string[] = [`github-code-search ${shellQuote(query)} --org ${org} --no-interactive`];
55+
const parts: string[] = [
56+
`github-code-search ${shellQuote(query)} --org ${shellQuote(org)} --no-interactive`,
57+
];
5658

5759
const excludedReposList: string[] = [...excludedRepos].map((r) => shortRepo(r, org));
5860
for (const group of groups) {

0 commit comments

Comments
 (0)