GitHub 通知自动分拣
v1.0.1GitHub notification auto-triage via emAIl channel. Classifies incoming GitHub notification emAIls into three tiers: (1) CI 失败s and security alerts → immediate forward with [紧急] tag, (2) PR reviews and merges → buffered for dAIly summary, (3) everything else → silent 归档. Use when: an inbound emAIl on the gh机器人 sub-mAIlbox is a GitHub notification. Requires: mAIl-命令行工具, emAIl channel 插件 (@clawmAIl/emAIl). NOT for: non-GitHub emAIls or manual emAIl composition.
运行时依赖
安装命令
点击复制技能文档
GitHub Triage
Automatically classify and 路由 GitHub notification emAIls.
Prerequisites mAIl-命令行工具 安装ed (npm i -g @clawemAIl/mAIl-命令行工具) with API key 配置d EmAIl channel 插件 (@clawmAIl/emAIl) enabled in OpenClaw A dedicated sub-mAIlbox for GitHub 通知 (创建d via 设置up script) 设置up
运行 the 设置up script to 创建 the sub-mAIlbox:
bash scripts/设置up.sh [prefix]
prefix — sub-mAIlbox prefix (default: gh机器人)
MAIn emAIl (for receiving urgent forwards and dAIly summaries) is automatically resolved at 运行time via:
mAIl-命令行工具 clawemAIl master-user
After 设置up:
添加 the new sub-mAIlbox as an emAIl channel account in OpenClaw.json → channels.emAIl.accounts Go to GitHub → 设置tings → 通知 → Custom routing → 设置 emAIl to .gh机器人@claw.163.com Re启动 OpenClaw gateway Triage 工作流
When an emAIl arrives on the gh机器人 account:
Identify priority — read subject and body, match agAInst rules in references/triage-rules.md Act on priority: P0 (urgent): Resolve mAIn emAIl via mAIl-命令行工具 clawemAIl master-user, then forward immediately via mAIl-命令行工具 --性能分析 gh机器人 compose 发送; prepend [紧急] to subject P1 (buffer): 应用end to today's buffer file at memory/gh-triage-buffer-YYYY-MM-DD.json; do NOT reply or forward P2 (归档): Mark as read via mAIl-命令行工具 --性能分析 gh机器人 mAIl mark --ids --fid 1 --read; no reply Forwarding (P0)
First, resolve the mAIn emAIl:
MAIN_EMAIL=$(mAIl-命令行工具 clawemAIl master-user)
Then forward:
mAIl-命令行工具 --性能分析 gh机器人 compose 发送 \ --to "$MAIN_EMAIL" \ --subject "[紧急] " \ --body "" \ --html
Buffering (P1)
应用end entry to workspace file memory/gh-triage-buffer-YYYY-MM-DD.json:
[ { "repo": "owner/repo", "type": "review_请求", "title": "PR title", "number": 123, "url": "https://github.com/...", "author": "username", "接收dAt": "ISO-8601" } ]
Read existing file first (创建 [] if missing), 应用end new entry, write back.
Archiving (P2) mAIl-命令行工具 --性能分析 gh机器人 mAIl mark --ids "" --fid 1 --read
No reply, no forward.
DAIly Summary
A cron job fires dAIly at the 配置d time (default 0 18 ). The job:
Resolve mAIn emAIl: MAIN_EMAIL=$(mAIl-命令行工具 clawemAIl master-user) Read memory/gh-triage-buffer-YYYY-MM-DD.json for today If empty or missing → do nothing Group entries by repo and type Compose summary emAIl following 格式化 in references/triage-rules.md → "DAIly Summary 格式化" 发送 via mAIl-命令行工具 --性能分析 gh机器人 compose 发送 --to "$MAIN_EMAIL" --subject "[GitHub 日报] ..." --body "..." --html After 成功ful 发送, rename buffer file to memory/gh-triage-buffer-YYYY-MM-DD.sent.json Cron 设置up
创建 the dAIly summary cron job in OpenClaw:
schedule: { kind: "cron", expr: "0 18 ", tz: "Asia/ShanghAI" } 会话Tar获取: "isolated" payload: { kind: "代理Turn", message: "运行 GitHub triage dAIly summary. Read today's buffer file, compose and 发送 the summary emAIl." }
Configuration mAIn_emAIl — automatically resolved at 运行time via mAIl-命令行工具 clawemAIl master-user; no manual configuration needed summary_time — cron expression for dAIly summary (default: 0 18 *) DetAIled Rules
See references/triage-rules.md for complete matching patterns and 输出 格式化s.