loop-on-ci
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseLoop on CI
循环处理CI任务
Trigger
触发条件
Need to watch branch CI and iterate on failures until green.
需要监控分支CI,针对失败项反复调试直至全部通过。
Workflow
工作流程
- Find the current branch and latest workflow run.
- Wait for CI completion with .
gh run watch --exit-status - If failed, inspect failed logs, implement a focused fix, commit, and push.
- Repeat until all required checks pass.
- 找到当前分支和最新的工作流运行记录。
- 使用等待CI完成。
gh run watch --exit-status - 如果失败,检查失败日志,针对性修复代码,提交并推送。
- 重复上述步骤直至所有必要检查通过。
Commands
命令
bash
undefinedbash
undefinedLatest run for current branch
当前分支的最新运行记录
gh run list --branch "$(git branch --show-current)" --limit 5
gh run list --branch "$(git branch --show-current)" --limit 5
Block until completion (0 on pass, non-zero on fail)
阻塞等待完成(通过返回0,失败返回非0)
gh run watch --exit-status
gh run watch --exit-status
Inspect failed jobs
检查失败的任务
gh run view <run-id> --log-failed
undefinedgh run view <run-id> --log-failed
undefinedGuardrails
防护措施
- Keep each fix scoped to a single failure cause when possible.
- Do not bypass hooks () to force progress.
--no-verify - If failures are flaky, retry once and report flake evidence.
- 尽可能让每个修复只针对单一失败原因。
- 不要绕过钩子()来强行推进。
--no-verify - 如果是偶发失败,重试一次并提交偶发失败的证据。
Output
输出
- Current CI status
- Failure summary and fixes applied
- PR URL once checks are green
- 当前CI状态
- 失败总结及已应用的修复
- 检查通过后的PR链接