ferminquant/openclaw-releaseops

GitHub: ferminquant/openclaw-releaseops

OpenClaw 的只读插件,用于从聊天中自动总结 GitHub Actions 失败部署的元数据、失败步骤、脱敏日志和可能原因。

Stars: 0 | Forks: 0

# OpenClaw ReleaseOps 只读的 OpenClaw 插件,用于从聊天中总结失败的 GitHub Actions 部署。 ## 概览 | 字段 | 值 | | --- | --- | | 工具 | `releaseops_failed_deploy_summary` | | 目的 | 从聊天中进行失败部署的排查 | | 来源 | GitHub Actions 的 workflow 运行、jobs、steps 和日志 | | 模式 | 只读本地插件 | | 安装 | `openclaw plugins install clawhub:@ferminquant/openclaw-releaseops` | | 演示仓库 | | | 公开仓库 | | ## 返回内容 | 输出 | 描述 | | --- | --- | | 失败的运行 | Workflow 运行元数据和状态 | | 失败的 jobs | 结论显示失败或中断的 jobs | | 失败的 steps | GitHub 报告的失败 step 名称 | | 日志摘录 | 相关的、已脱敏的日志行 | | 可能的原因 | 来自 steps 和日志的第一个有用失败信号 | | 后续检查 | 用于部署排查的后续检查 | | 回滚清单 | 用于回滚准备情况的只读清单存根 | ## 不会执行的操作 | 边界 | 状态 | | --- | --- | | 触发部署 | 否 | | 重新运行 workflow | 否 | | 执行回滚 | 否 | | 创建或修改 GitHub issues | 否 | | 修改 GitHub 状态 | 否 | | 需要托管后端 | 否 | ## 从 ClawHub 安装 ``` openclaw plugins install clawhub:@ferminquant/openclaw-releaseops openclaw plugins enable releaseops openclaw plugins inspect releaseops --runtime --json ``` 预期的检查信号: | 字段 | 预期值 | | --- | --- | | 插件 ID | `releaseops` | | 可选工具 | `releaseops_failed_deploy_summary` | ## 尝试演示 公开演示: | 字段 | 值 | | --- | --- | | 仓库 | `ferminquant/releaseops-demo-failing-actions` | | Workflow | `deploy.yml` | | 分支 | `main` | | 失败的运行 | | 提示词: ``` Use releaseops_failed_deploy_summary to summarize failed GitHub Actions run 26300685264. Use repo ferminquant/releaseops-demo-failing-actions, workflow deploy.yml, branch main, and include the log excerpt. ``` 预期的摘要信号: | 信号 | 预期值 | | --- | --- | | 失败的 job | `deploy-demo-service` | | 失败的 step | `Deploy to demo environment` | | 最清晰的日志信号 | `Simulated deploy endpoint returned HTTP 503` | 为了获得最丰富的演示效果,在请求日志摘录之前,请确保 Gateway 能够看到 `GITHUB_TOKEN`。如果要在没有 token 的情况下进行冒烟测试,请将提示词更改为 `includeLogExcerpt false`。 ## 专用 Agent 设置 通过专用的 ReleaseOps agent 公开可选工具,以便默认的 `main` agent 不会继承发布/事件工具。 将此配置结构添加到 OpenClaw config 中: ``` { agents: { list: [ // Keep your existing agents here, then add: { id: "releaseops", name: "ReleaseOps", skills: [], tools: { profile: "minimal", alsoAllow: ["releaseops_failed_deploy_summary"], }, }, ], }, plugins: { entries: { releaseops: { enabled: true, config: { githubTokenEnv: "GITHUB_TOKEN", defaultRepo: "ferminquant/releaseops-demo-failing-actions", defaultWorkflow: "deploy.yml", defaultBranch: "main", runbookPath: "./runbooks/rollback.md", }, }, }, }, } ``` 然后重启 Gateway: ``` openclaw gateway restart ``` 注意事项: | 设置 | 重要原因 | | --- | --- | | `tools.alsoAllow` | 将可选的插件工具添加到选定的 profile 中 | | `skills: []` | 防止通用的 GitHub skills 与 ReleaseOps 工具产生冲突 | | `tools.allow` 加上 `tools.alsoAllow` | 目前在同一作用域内会被 OpenClaw 拒绝 | ## 配置你的仓库 替换演示默认值: ``` { plugins: { entries: { releaseops: { enabled: true, config: { githubTokenEnv: "GITHUB_TOKEN", defaultRepo: "owner/repo", defaultWorkflow: "deploy.yml", defaultBranch: "main", runbookPath: "./runbooks/rollback.md", }, }, }, }, } ``` GitHub token 指南: | 仓库类型 | Token 指南 | | --- | --- | | 公开仓库 | 可以在没有 token 的情况下工作,但速率限制较低 | | 私有仓库 | 需要只读的 GitHub 访问权限 | 建议的最低 GitHub 权限: | 权限 | 级别 | | --- | --- | | Actions | read | | Contents | read | | Metadata | read | 如果 Gateway 作为 systemd 用户服务运行: ``` systemctl --user set-environment GITHUB_TOKEN="$(gh auth token)" openclaw gateway restart ``` ## 本地开发 ``` npm test node --check index.js node --check src/github-actions.js node --check src/format.js node --check src/logs.js ``` 本地链接安装: ``` openclaw plugins install --link . openclaw plugins enable releaseops openclaw plugins inspect releaseops --runtime --json ``` ## 反馈 反馈是异步且对公众安全的。请勿粘贴机密信息、私人日志、客户数据或私人事件详情。 | 反馈途径 | 链接 | | --- | --- | | 演示反馈 | [创建 issue](https://github.com/ferminquant/openclaw-releaseops/issues/new?template=demo-feedback.yml) | | 缺少失败部署的上下文 | [创建 issue](https://github.com/ferminquant/openclaw-releaseops/issues/new?template=missing-context.yml) | | 托管测试版意向 | [创建 issue](https://github.com/ferminquant/openclaw-releaseops/issues/new?template=hosted-beta-interest.yml) | ## 产品姿态 | 原则 | 方向 | | --- | --- | | 商业路径 | 产品主导,而非咨询主导 | | 验证 | 有用的演示/内容和异步反馈 | | 托管后端 | 仅在验证之后 | 后续可能的托管功能: | 可能的功能 | 时机 | | --- | --- | | 定期的失败部署摘要 | 稍后,如果通过验证 | | 保存的 runbooks | 稍后,如果通过验证 | | 团队发布历史 | 稍后,如果通过验证 | | Slack、Discord 或 Telegram 推送 | 稍后,如果通过验证 | ## 更多文档 | 文档 | 用途 | | --- | --- | | [项目背景](PROJECT_CONTEXT.md) | 交接和产品背景 | | [演示演练](docs/demo-walkthrough.md) | 简短的演示脚本 | | [验证计划](docs/validation-plan.md) | 被动的产品主导验证 | | [ClawHub 发布](docs/clawhub-publishing.md) | 发布和验证说明 | | [公开文章草稿](docs/public-writeup.md) | 可分享的文章草稿 | | [被动分享套件](docs/share-kit.md) | 轻量级的分享文案 |
标签:GitHub Actions, MITM代理, 故障排查, 数据可视化, 暗色界面, 自动化插件, 自动笔记, 自定义脚本