Description
scripts/start-issue.ts passes GraphQL queries to gh api graphql using single-quoted multi-line strings via execSync. This works on macOS/Linux bash but fails on Windows because CMD and PowerShell handle single quotes differently.
The query string arrives mangled, producing:
gh: Expected one of SCHEMA, SCALAR, TYPE, ENUM, INPUT, UNION, INTERFACE, actual: UNKNOWN_CHAR ("") at [1, 1]
The branch creation and checkout still succeed, but the GitHub Projects integration (setting status to "In Progress" and Start Date) silently fails.
Affected functions: setProjectStatus() and setProjectDate() in scripts/start-issue.ts:71-198
Steps to reproduce
- Clone the repo on Windows
- Run
pnpm start-issue 4
- Branch is created successfully, but two warnings appear:
Warning: could not update project status — ...
Warning: could not set Start Date — ...
Expected behavior
Project status should be set to "In Progress" and Start Date should be set to today's date, same as on macOS.
Suggested fix
Replace execSync shell-quoted GraphQL calls with stdin-based approach that works cross-platform:
// Instead of:
run(`gh api graphql -f query='...'`);
// Use:
execSync(`gh api graphql`, {
input: JSON.stringify({ query: `...` }),
encoding: "utf-8",
});
Or write the query to a temp file and use --input.
Description
scripts/start-issue.tspasses GraphQL queries togh api graphqlusing single-quoted multi-line strings viaexecSync. This works on macOS/Linux bash but fails on Windows because CMD and PowerShell handle single quotes differently.The query string arrives mangled, producing:
The branch creation and checkout still succeed, but the GitHub Projects integration (setting status to "In Progress" and Start Date) silently fails.
Affected functions:
setProjectStatus()andsetProjectDate()inscripts/start-issue.ts:71-198Steps to reproduce
pnpm start-issue 4Expected behavior
Project status should be set to "In Progress" and Start Date should be set to today's date, same as on macOS.
Suggested fix
Replace
execSyncshell-quoted GraphQL calls with stdin-based approach that works cross-platform:Or write the query to a temp file and use
--input.