GPT-5 finding
Live fallback pagination command produces invalid JSON (gh --paginate with --jq array)
- skills/fork-first-run-alert/SKILL.md:118-122
With gh, --paginate runs the jq filter per page and prints each page's result sequentially. Because the jq expression here yields an array, the output file will contain multiple JSON arrays back-to-back, which is not valid JSON and cannot be read as a single array later. This breaks downstream processing that expects /tmp/forks.json to be one JSON array.
Recommendation
Use a streaming jq filter for items per page, then slurp to one array. For example: - gh api "repos/${PARENT_REPO}/forks?per_page=100" --paginate --jq '.[] | select(.archived!=true and .disabled!=true) | {full_name, owner: .owner.login, stargazers_count, created_at, pushed_at}' > /tmp/forks.ndjson - jq -s 'sort_by(.pushed_at) | reverse | .[:80]' /tmp/forks.ndjson > /tmp/forks.json Alternatively: gh api ... --paginate | jq -c '.[] | select(...)' | jq -s '.' > /tmp/forks.json