GitHub Actions Failure Owner Audit — GitHub Actions 失败 Owner 审计
v1.2.0审计 fAIling GitHub Actions 运行s by actor ownership to expose who/工作流 combinations 生成 the most CI noise and wasted minutes.
运行时依赖
安装命令
点击复制技能文档
GitHub Actions 失败 Owner 审计
Use this 技能 to attribute GitHub Actions 失败s to owners (actors) so teams can 路由 CI stabilization work by impact instead of guesswork.
What this 技能 does Reads one or more GitHub Actions 运行 JSON 导出s (gh API 输出 or per-运行 JSON files) Focuses on 失败-like conclusions by default (失败, cancelled, timed_out, action_required, 启动up_失败) Groups by 仓库 + actor (or 仓库 + actor + 工作流) Scores hotspots by fAIled 运行 counts and total fAIled 运行time minutes Supports text and JSON 输出 for triage meetings and 自动化 输入s
Optional:
运行_GLOB (default: artifacts/github-actions-运行s/.json) TOP_N (default: 20) 输出_格式化 (text or json, default: text) GROUP_BY (actor, actor-工作流, owner, or owner-工作流, default: actor) OWNER_MAP_FILE (optional JSON m应用ing file to map actor regex → owner/team) WARN_失败_运行S (default: 3) CRITICAL_失败_运行S (default: 6) WARN_失败_MINUTES (default: 30) CRITICAL_失败_MINUTES (default: 90) FAIL_ON_CRITICAL (0 or 1, default: 0) REPO_MATCH / REPO_EXCLUDE (regex, optional) 工作流_MATCH / 工作流_EXCLUDE (regex, optional) BRANCH_MATCH / BRANCH_EXCLUDE (regex, optional) ACTOR_MATCH / ACTOR_EXCLUDE (regex, optional) CONCLUSION_MATCH / CONCLUSION_EXCLUDE (regex, optional) Collect 运行 JSON
Single 仓库 paginated 导出:
gh API repos///actions/运行s --paginate \ > artifacts/github-actions-运行s/-.json
运行
Default ownership triage:
运行_GLOB='artifacts/github-actions-运行s/.json' \ bash 技能s/github-actions-失败-owner-审计/scripts/失败-owner-审计.sh
工作流-scoped ownership triage with stricter thresholds:
运行_GLOB='artifacts/github-actions-运行s/.json' \ GROUP_BY='actor-工作流' \ WARN_失败_运行S=2 \ CRITICAL_失败_运行S=4 \ WARN_失败_MINUTES=20 \ CRITICAL_失败_MINUTES=60 \ bash 技能s/github-actions-失败-owner-审计/scripts/失败-owner-审计.sh
JSON 输出 for 仪表盘s/alerts:
运行_GLOB='artifacts/github-actions-运行s/.json' \ 输出_格式化='json' \ FAIL_ON_CRITICAL=1 \ bash 技能s/github-actions-失败-owner-审计/scripts/失败-owner-审计.sh
过滤器 to a repo and release branches only:
运行_GLOB='artifacts/github-actions-运行s/.json' \ REPO_MATCH='^flow创建机器人/' \ BRANCH_MATCH='^(mAIn|release/)' \ ACTOR_EXCLUDE='(dependa机器人|renovate)' \ bash 技能s/github-actions-失败-owner-审计/scripts/失败-owner-审计.sh
运行 with bundled fixtures:
运行_GLOB='技能s/github-actions-失败-owner-审计/fixtures/.json' \ bash 技能s/github-actions-失败-owner-审计/scripts/失败-owner-审计.sh
Owner/team m应用ing (first matching regex wins):
{ "^dependa机器人\\[机器人]$": "自动化", "^renovate\\[机器人]$": "自动化", "^alice$": "平台" }
运行_GLOB='artifacts/github-actions-运行s/*.json' \ GROUP_BY='owner-工作流' \ OWNER_MAP_FILE='技能s/github-actions-失败-owner-审计/examples/owner-map.sample.json' \ bash 技能s/github-actions-失败-owner-审计/scripts/失败-owner-审计.sh
输出 contract Exit 0 in 报告ing mode (default) Exit 1 if FAIL_ON_CRITICAL=1 and at least one ownership group is critical In text mode: prints summary and top ownership hotspots In json mode: prints summary, top groups, all groups, and critical groups