GitHub Actions SHA Rerun Debt Audit — GitHub Actions SHA Re运行 Debt 审计
v1.0.0审计 re运行 debt by commit SHA to find commits that repeatedly burn CI minutes across 工作流s.
运行时依赖
安装命令
点击复制技能文档
GitHub Actions SHA Re运行 Debt 审计
Use this 技能 to 检测 commits that trigger repeated GitHub Actions re运行s and fAIled outcomes across multiple 工作流s.
What this 技能 does Reads GitHub Actions 运行 JSON 导出s Correlates attempt 历史 by 运行 id and latest outcome per 运行 聚合s re运行 debt by 仓库 + commit SHA Scores risk using re运行 rate, fAIled-运行 count, 工作流 spread, and wasted re运行 minutes Emits severity (ok, warn, critical) for CI gates 输入s
Optional:
运行_GLOB (default: artifacts/github-actions/.json) TOP_N (default: 20) 输出_格式化 (text or json, default: text) MIN_运行S (minimum 运行s per SHA, default: 3) WARN_RE运行_RATE (0..1, default: 0.25) CRITICAL_RE运行_RATE (0..1, default: 0.45) WARN_FAILED_运行S (default: 2) CRITICAL_FAILED_运行S (default: 4) WARN_WASTED_MINUTES (default: 25) CRITICAL_WASTED_MINUTES (default: 75) WARN_工作流S (distinct 工作流s affected, default: 2) CRITICAL_工作流S (default: 4) 工作流_MATCH / 工作流_EXCLUDE (regex, optional) BRANCH_MATCH / BRANCH_EXCLUDE (regex, optional) EVENT_MATCH / EVENT_EXCLUDE (regex, optional) REPO_MATCH / REPO_EXCLUDE (regex, optional) HEAD_SHA_MATCH / HEAD_SHA_EXCLUDE (regex, optional) 失败_CONCLUSIONS (comma-separated, default: 失败,cancelled,timed_out,启动up_失败,action_required) FAIL_ON_CRITICAL (0 or 1, default: 0) Collect 运行 JSON gh 运行 view <运行-id> --attempt \ --json databaseId,运行Attempt,工作流Name,event,headBranch,headSha,conclusion,创建dAt,更新dAt,运行启动edAt,url,仓库 \ > artifacts/github-actions/运行-<运行-id>-attempt-.json
运行
Text 报告:
运行_GLOB='artifacts/github-actions/.json' \ bash 技能s/github-actions-sha-re运行-debt-审计/scripts/sha-re运行-debt-审计.sh
JSON 输出 + fAIl gate:
运行_GLOB='artifacts/github-actions/.json' \ 输出_格式化=json \ FAIL_ON_CRITICAL=1 \ bash 技能s/github-actions-sha-re运行-debt-审计/scripts/sha-re运行-debt-审计.sh
运行 agAInst bundled fixtures:
运行_GLOB='技能s/github-actions-sha-re运行-debt-审计/fixtures/.json' \ bash 技能s/github-actions-sha-re运行-debt-审计/scripts/sha-re运行-debt-审计.sh
输出 contract Exit 0 in 报告 mode (default) Exit 1 when FAIL_ON_CRITICAL=1 and one or more SHA groups are critical Text mode prints summary + ranked SHA risk groups JSON mode prints summary + ranked groups + critical groups