fix(bot): force json or --no-pager in gh cli commands to prevent hangs

- Replaces `gh issue list` with the `--json` flag to prevent default pagers (like `less`) from waiting for user input and hanging the CI run.
- Adds `--no-pager` to `gh run view`.
This commit is contained in:
Christian Gunderman
2026-05-13 11:17:02 -07:00
parent c460745bcb
commit 8a6ec5978c
2 changed files with 2 additions and 2 deletions
@@ -25,7 +25,7 @@ maintain existing PRs to reduce the repository backlog.
1. **Inventory & Drive PRs**: Use the `prs` skill to list all open PRs labeled `bot-fix`. 1. **Inventory & Drive PRs**: Use the `prs` skill to list all open PRs labeled `bot-fix`.
- If any require attention (CI failure, requested changes), focus your entire run on resolving ONE of them. - If any require attention (CI failure, requested changes), focus your entire run on resolving ONE of them.
- Do NOT start a new issue fix if an existing PR needs work. - Do NOT start a new issue fix if an existing PR needs work.
2. **Search for Candidates**: If no PRs need attention, search for `effort/small` issues: `gh issue list --label "effort/small" --limit 10`. 2. **Search for Candidates**: If no PRs need attention, search for `effort/small` issues: `gh issue list --label "effort/small" --limit 10 --json number,title,url`.
- **CRITICAL**: Do NOT run local discovery commands (e.g., `npm run lint`, `npm run typecheck`) to look for "easy fixes". `gh issue list` is your ONLY source for new tasks. - **CRITICAL**: Do NOT run local discovery commands (e.g., `npm run lint`, `npm run typecheck`) to look for "easy fixes". `gh issue list` is your ONLY source for new tasks.
3. **Select ONE Issue** and implement a fix on a new branch. 3. **Select ONE Issue** and implement a fix on a new branch.
4. **Verify** via `npm run preflight`. 4. **Verify** via `npm run preflight`.
@@ -52,6 +52,6 @@ existing bot PR:
3. **Respond to Maintainers**: 3. **Respond to Maintainers**:
- For general responses, write your markdown comment to `issue-comment.md`. - For general responses, write your markdown comment to `issue-comment.md`.
- For specific PR feedback, write your markdown response to `pr-comment.md`. - For specific PR feedback, write your markdown response to `pr-comment.md`.
4. **Handle CI Failures**: Diagnose failing checks using `gh run view`. Your 4. **Handle CI Failures**: Diagnose failing checks using `gh --no-pager run view` or `gh api`. Your
priority must be generating a new patch and staging it with `git add` to fix priority must be generating a new patch and staging it with `git add` to fix
the failure. the failure.