Loop On Ci

作者 cursorccb5507cec15无许可证10K 个星标收录于 2026年10月8日更新于 2026年10月8日仓库今天更新

Monitor PR checks and fix failures until green. Uses gh pr checks as the source of truth for PR-attached checks.

仅含说明DevOps & Cloud
AI 生成的概览

使用 gh 监控拉取请求的 CI 检查,并反复修复失败,直到所有必需检查通过。

功能
该技能定义了一套工作流程,用于监控拉取请求上挂载的检查并修复失败,直到全部变绿。它会解析当前 PR、检查现有检查集、诊断失败、以 fail-fast 方式监视待处理检查,并在每次推送后重新检查。它产出 CI 状态、失败摘要与所做修复,以及检查通过后的 PR 链接。
适用场景
当你需要监视某个分支或拉取请求,并反复处理 CI 失败直到所有必需检查通过时使用。它适合在 PR 上进行反复推送与验证的循环。
运行要求
需要已针对该仓库完成认证的 GitHub CLI(gh),并具备访问 GitHub 的网络连接。该技能仅为说明文档,不附带脚本。

Loop on CI

Trigger

Need to watch a branch or pull request and iterate on CI failures until all required checks are green.

Use gh pr checks as the source of truth. It includes all PR-attached checks, while gh run list only covers GitHub Actions.

Workflow

  1. Resolve the PR for the current branch.
  2. Inspect current PR checks before waiting.
  3. If checks already failed, diagnose those failures first.
  4. If checks are pending, watch with gh pr checks --watch --fail-fast.
  5. After each push, re-check the full PR check set and repeat until green.

Commands

bash
# Resolve the active PRgh pr view --json number,url,headRefName
# Inspect all attached checksgh pr checks --json name,bucket,state,workflow,link
# Watch pending checks and fail fastgh pr checks --watch --fail-fast
# GitHub Actions logs, when the failing check links to a GHA rungh run view <run-id> --log-failed

Guardrails

  • Keep each fix scoped to a single failure cause when possible.
  • Do not bypass hooks (--no-verify) to force progress.
  • If the failure is clearly unrelated to the PR and appears fixed on main, merge latest main instead of bloating the PR with unrelated fixes.
  • If failures are flaky, retry once and report flake evidence.
  • Re-run gh pr checks --json name,bucket,state,workflow,link after every push; the check set can change.

Output

  • Current CI status
  • Failure summary and fixes applied
  • PR URL once checks are green

来源与署名

来源:cursor/plugins位于cursor-team-kit/skills/loop-on-ci提交ccb5507

许可证: 无许可证

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架