返回顶部
g

github-actions-commit-health-audit提交健康审计

Audit GitHub Actions reliability by commit SHA to surface risky commits causing repeated workflow failures across branches.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
233
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

github-actions-commit-health-audit

技能名称:github-actions-commit-health-audit
详细描述:

GitHub Actions 提交健康审计

使用此技能查找持续集成(CI)反复失败的提交,以便团队优先处理回滚、还原或针对性修复。

此技能的功能

  • - 读取 GitHub Actions 运行记录的 JSON 导出文件
  • 按仓库 + 提交 SHA 对运行记录进行分组
  • 根据失败率、失败运行数量和工作流分布对提交风险进行评分
  • 标记警告/严重级别的提交热点
  • 输出文本或 JSON 格式结果,用于 CI 检查和分类仪表板

输入参数

可选参数:
  • - RUNGLOB(默认值:artifacts/github-actions/*.json)
  • TOPN(默认值:20)
  • OUTPUTFORMAT(text 或 json,默认值:text)
  • MINRUNS(默认值:2)
  • BRANCHMATCH(正则表达式,可选)
  • BRANCHEXCLUDE(正则表达式,可选)
  • WORKFLOWMATCH(正则表达式,可选)
  • WORKFLOWEXCLUDE(正则表达式,可选)
  • REPOMATCH(正则表达式,可选)
  • REPOEXCLUDE(正则表达式,可选)
  • SHAMATCH(正则表达式,可选)
  • SHAEXCLUDE(正则表达式,可选)
  • FAILWARNPERCENT(默认值:25)
  • FAILCRITICALPERCENT(默认值:50)
  • WARNSCORE(默认值:35)
  • CRITICALSCORE(默认值:60)
  • FAILONCRITICAL(0 或 1,默认值:0)

收集运行 JSON

bash
gh run view --json databaseId,workflowName,event,conclusion,headBranch,headSha,createdAt,updatedAt,startedAt,url,repository \
> artifacts/github-actions/run-.json

运行

文本报告:

bash
RUN_GLOB=artifacts/github-actions/*.json \
MIN_RUNS=3 \
bash skills/github-actions-commit-health-audit/scripts/commit-health-audit.sh

带失败门控的 JSON 输出:

bash
RUN_GLOB=artifacts/github-actions/*.json \
OUTPUT_FORMAT=json \
FAILONCRITICAL=1 \
bash skills/github-actions-commit-health-audit/scripts/commit-health-audit.sh

使用内置测试数据运行:

bash
RUN_GLOB=skills/github-actions-commit-health-audit/fixtures/*.json \
bash skills/github-actions-commit-health-audit/scripts/commit-health-audit.sh

输出约定

  • - 报告模式下退出码为 0(默认)
  • 当 FAILONCRITICAL=1 且存在一个或多个严重提交时,退出码为 1
  • 文本模式输出摘要 + 按风险排序的提交分组
  • JSON 模式输出摘要 + 评分分组 + 严重提交详情

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 github-actions-commit-health-audit-1776197892 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 github-actions-commit-health-audit-1776197892 技能

通过命令行安装

skillhub install github-actions-commit-health-audit-1776197892

下载

⬇ 下载 github-actions-commit-health-audit v1.0.0(免费)

文件大小: 7.8 KB | 发布时间: 2026-4-15 10:47

v1.0.0 最新 2026-4-15 10:47
Initial release – Audits GitHub Actions by commit to identify and score risky commits:

- Reads exported GitHub Actions run JSON and groups by repository + commit SHA
- Scores and flags commits with high failure rates, volumes, and workflow spread
- Provides configurable output (text or JSON), filtering, and thresholds
- Supports optional fail-gate for CI blocking on critical commit risks
- Outputs commit health summaries for CI checks and triage dashboards

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部