| name | babysit |
| description | Watch a pull request or review cycle until it is ready to merge. Use when asked to babysit, monitor, or keep checking PR comments, reviews, and CI until all actionable issues are resolved. |
Babysit PR
Stay with the PR until it is actually clean. Do not stop after one check pass if comments or review threads are still unresolved.
Workflow
- Identify the PR number, branch, and base branch.
- Confirm the PR is not draft and inspect mergeability, checks, review decision, comments, and review threads.
- Watch pending checks until they finish. Poll at a practical interval, usually 30-60 seconds unless the user asks for a different cadence.
- Read new comments and unresolved review threads. Treat bot summaries as useful, but verify actionable findings against the code.
- Fix real issues in focused commits, run relevant tests/builds, push, and return to step 2.
- Resolve stale review threads only after verifying the code or generated artifact now addresses the comment.
- Stop only when checks are passing or intentionally skipped, review decision is acceptable, no actionable comments remain, and no unresolved review threads remain.
GitHub CLI Checks
Use gh pr view for the coarse status:
gh pr view <number> --json \
number,state,isDraft,mergeable,mergeStateStatus,reviewDecision,headRefOid,statusCheckRollup,url
Resolve the repository owner/name before using GraphQL:
repo_json=$(gh repo view --json owner,name)
owner=$(jq -r '.owner.login // .owner.name' <<<"$repo_json")
repo=$(jq -r '.name' <<<"$repo_json")
Use GraphQL for unresolved review threads. Include ; omit on the first page, then pass the previous with while is .