GitHub Monitor
Build one-cron multi-repo monitoring with deduplication, severity routing, and low-noise notifications.
Quick setup
Collect:
- -
repos: list of INLINECODE1 - INLINECODE2 :
major_only | balanced | INLINECODE5 - INLINECODE6 : recommended 2h
- INLINECODE7 : e.g. INLINECODE8
- INLINECODE9 : e.g. INLINECODE10
- INLINECODE11 : user/channel id
- INLINECODE12 : e.g. INLINECODE13
Use one isolated cron job to monitor all repos.
Data sources per repo
Check with GitHub public APIs each run:
- 1. Latest release
- Recent commits (last 50, filtered by run window)
- Recently merged PRs (filtered by run window)
Policy modes
1) major_only
- - Notify only P0 events
- Skip P1/P2 notifications
P0 signals:
- - New release
- PR keyword hit: INLINECODE14
2) balanced (default)
- - P0/P1 immediate notify
- P2 daily digest
P1 keyword examples:
3) verbose
- - P0/P1 immediate
- P2 also immediate (or short-window batched)
Severity scoring recommendations
Do not rely on title keyword only; combine signals:
- - Title/body keyword hit
- Label hit
- Changed paths weighting:
- higher weight:
core/,
gateway/,
agent/,
runtime/
- lower weight:
docs/,
tests/, INLINECODE22
Baseline + notification window (critical)
Track notification cursors in state to avoid backfilling old events:
- -
installed_at: skill first-run time - INLINECODE24 : last successful scan time
- INLINECODE25 : last time user was notified
Rules:
- 1. On first install/run, initialize all three to
now and do not send historical events. - Each run only evaluates events in
(last_checked_at, now]. - Notify only for events newer than
last_notified_at. - After sending any alert/digest, set
last_notified_at = now. - After successful scan, set
last_checked_at = now.
Noise control
- - Dedup fingerprint: INLINECODE31
- Silent when no new events
- Merge same-run alerts into one message grouped by repo
- Keep digest queue for P2 in state (
pending_daily)
Reliability
- - Retry transient API failures with exponential backoff
- If repeated failures, send one degradation alert
- Send one recovery alert when healthy again
- Persist state at end of successful run
Suggested OpenClaw cron behavior
- - One job for all repos (easy scaling)
- Add/remove repos by editing list only
- Preserve one state file for dedup across restarts
Output mode (default: brief impact summary)
Default output must be concise and decision-oriented, not event-by-event long list.
Use this fixed structure:
- 1. 本窗口结论(是否有关键变化)
- 对用户可能影响(3-5 条,按优先级)
- 建议动作(最多 3 条)
- 详情入口:回复“看详情”再展开事件清单
Impact-first grouping (preferred):
- - 配置/兼容性风险(breaking、config schema、auth、gateway)
- 通知/渠道行为变化(telegram/slack/feishu/discord/channel)
- 会话与路由变化(session/dispatch/provider/tools)
- 稳定性/性能修复(timeout、race、retry)
- 文档/测试类(低优先)
Detailed mode (on-demand)
Only when the user explicitly asks “看详情/展开/给清单”, output event-level details with links.
GitHub Monitor
构建一次定时任务、多仓库监控,具备去重、严重性路由和低噪音通知功能。
快速配置
收集以下信息:
- - repos:owner/repo 格式的仓库列表
- policymode:majoronly | balanced | verbose
- checkinterval:建议 2 小时
- timezone:例如 America/NewYork
- dailydigesttime:例如 21:00
- notifytarget:用户/频道 ID
- statefile:例如 /root/.openclaw/workspace/memory/repo-watch/multi-repos.json
使用一个独立的定时任务监控所有仓库。
每个仓库的数据来源
每次运行时通过 GitHub 公开 API 检查:
- 1. 最新发布版本
- 近期提交(最近 50 条,按运行窗口过滤)
- 近期合并的 PR(按运行窗口过滤)
策略模式
1) major_only
P0 信号:
- - 新版本发布
- PR 关键词命中:breaking|migration|security|auth
2) balanced(默认)
P1 关键词示例:
- - gateway|config schema|tooling|memory|cron|session|channel|provider|search|index|install|auth flow
3) verbose
- - P0/P1 立即通知
- P2 也立即通知(或短窗口批量发送)
严重性评分建议
不要仅依赖标题关键词,应结合多种信号:
- 较高权重:core/、gateway/、agent/、runtime/
- 较低权重:docs/、tests/、examples/
基线 + 通知窗口(关键)
在状态中记录通知游标,避免回溯旧事件:
- - installedat:技能首次运行时间
- lastcheckedat:上次成功扫描时间
- lastnotified_at:上次通知用户的时间
规则:
- 1. 首次安装/运行时,将三个时间戳均初始化为 now,不发送历史事件。
- 每次运行仅评估 (lastcheckedat, now] 范围内的事件。
- 仅通知晚于 lastnotifiedat 的事件。
- 发送任何告警/摘要后,将 lastnotifiedat 设为 now。
- 成功扫描后,将 lastcheckedat 设为 now。
噪音控制
- - 去重指纹:repo + eventtype + eventid/hash
- 无新事件时保持静默
- 同次运行的告警合并为一条消息,按仓库分组
- 在状态中保留 P2 的摘要队列(pending_daily)
可靠性
- - 对临时性 API 失败使用指数退避重试
- 若反复失败,发送一次降级告警
- 恢复正常后发送一次恢复告警
- 成功运行结束时持久化状态
建议的 OpenClaw 定时任务行为
- - 所有仓库使用一个任务(便于扩展)
- 通过编辑列表即可添加/移除仓库
- 保留一个状态文件,用于重启后的去重
输出模式(默认:简洁影响摘要)
默认输出必须简洁且面向决策,而非逐条列出事件。
使用以下固定结构:
- 1. 本窗口结论(是否存在关键变化)
- 对用户可能的影响(3-5 条,按优先级排序)
- 建议动作(最多 3 条)
- 详情入口:回复“看详情”展开事件清单
影响优先分组(推荐):
- - 配置/兼容性风险(breaking、config schema、auth、gateway)
- 通知/渠道行为变化(telegram/slack/feishu/discord/channel)
- 会话与路由变化(session/dispatch/provider/tools)
- 稳定性/性能修复(timeout、race、retry)
- 文档/测试类(低优先级)
详细模式(按需)
仅当用户明确要求“看详情/展开/给清单”时,输出包含链接的事件级详情。