返回 Skill 列表
extension
分类: 开发与工程无需 API Key

ci-watcher

通过单个shell循环高效地查看GitHub PR的CI状态,然后触发下一步操作

person作者: jakexiaohubgithub

ci-watcher

Watches a PR's CI checks in a single exec call instead of burning agent turns polling.

Usage

From shell (via exec)

bash skills/ci-watcher/scripts/wait_for_ci.sh <repo> <pr_number> [max_wait_secs] [poll_interval_secs]

From an agent skill

exec("bash skills/ci-watcher/scripts/wait_for_ci.sh owner/repo 42 600 15", timeout=660)

Parse the JSON output, then take action based on status:

| status | exit code | meaning | |-----------|-----------|--------------------------------| | success | 0 | All checks passed | | failure | 1 | One or more checks failed | | timeout | 2 | Exceeded max wait time |

Next actions (agent decides after parsing output)

  • merge: gh pr merge <pr> --repo <repo> --merge --delete-branch (only if status=success + mergeable=MERGEABLE)
  • notify: return the JSON to the calling skill
  • review: spawn a reviewer subagent on the PR
  • rebase-and-retry: if mergeable=CONFLICTING, run git rebase and re-push

Output format

{
  "status": "success|failure|timeout",
  "checks": [{"name": "...", "status": "...", "conclusion": "...", "url": "..."}],
  "mergeable": "MERGEABLE|CONFLICTING|UNKNOWN",
  "failed_checks": [{"name": "...", "url": "..."}],
  "elapsed_seconds": 45
}