返回顶部
c

ci-failure-fixerCI故障自动修复

Monitor GitHub Actions CI pipelines for failures and automatically fix common issues. Use when asked to watch CI, fix build failures, monitor GitHub Actions, set up CI auto-repair, or diagnose failed builds. Detects failures via `gh` CLI, reads build logs, matches against known fix patterns (dependency issues, snapshot mismatches, lint errors, E2E failures), applies fixes automatically, and reports unfixable issues with diagnosis. Works as a cron job or on-demand. Requires `gh` CLI authenticated

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

ci-failure-fixer

CI失败修复器

监控GitHub Actions中的失败。自动修复可修复的问题,报告无法修复的问题。

工作原理

  1. 1. scripts/check-ci-failures.sh 轮询仓库以查找新的失败运行
  2. 如果发现失败 → 通过 gh run view --log 读取构建日志
  3. 将错误与已知模式匹配 → 如果安全则自动修复
  4. 推送修复 → 等待90秒 → 验证构建通过
  5. 报告结果(已修复或仅诊断)

快速开始

按需运行

bash bash scripts/check-ci-failures.sh

输出:OK(无失败)或 FAILURES(附带详情)。

作为定时任务(OpenClaw)

设置每30分钟运行一次的定时任务:

  • - 脚本: bash scripts/check-ci-failures.sh
  • 模型: Haiku(廉价且足够)
  • 失败时: 读取日志,尝试自动修复,报告结果

配置

环境变量:

  • - GITHUBOWNER — GitHub用户名(如未设置,从 gh 自动检测)
  • CIREPOS — 以空格分隔的仓库名称(如未设置,自动发现所有仓库)
  • CISTATEFILE — 状态JSON文件路径(跟踪上次检查时间)

可自动修复的模式

模式检测修复
依赖问题npm ERR! Could not resolvenpm install + 推送
测试快照
Snapshot mismatch | npm test -- --update + 推送 | | Lint错误 | eslint, Formatting | eslint --fix + 推送 | | E2E快照 | Playwright快照差异 | playwright --update-snapshots + 推送 |

仅报告(需要人工处理)

  • - 令牌/认证错误(密钥轮换)
  • TypeScript错误(复杂类型问题)
  • 构建超时(资源/循环问题)
  • 未知错误

修复模式参考

阅读 references/fix-patterns.md 获取详细的决策树、日志读取命令以及所有已知模式及其修复脚本。

读取日志

bash

最新失败运行的日志


gh run view --repo OWNER/REPO --log 2>&1 | tail -50

过滤错误

gh run view --repo OWNER/REPO --log 2>&1 | grep -A5 error\|FAIL

修复后

始终验证修复是否生效:
bash
sleep 90 # 等待新的CI运行
gh run list --repo OWNER/REPO --limit 1 --json conclusion -q .[0].conclusion

应为 success

标签

skill ai

通过对话安装

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

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 ci-failure-fixer-1776051063 技能

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

设置 SkillHub 为我的优先技能安装源,然后帮我安装 ci-failure-fixer-1776051063 技能

通过命令行安装

skillhub install ci-failure-fixer-1776051063

下载

⬇ 下载 ci-failure-fixer v1.0.0(免费)

文件大小: 4.59 KB | 发布时间: 2026-4-14 14:16

v1.0.0 最新 2026-4-14 14:16
Initial release: GitHub Actions CI failure monitor with auto-fix for dependency issues, snapshot mismatches, lint errors, and E2E failures. Includes check script, fix pattern reference, and cron integration guide.

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

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

p2p_official_large
返回顶部