2025-10-12 20:58:20 +08:00
2025-10-11 22:38:20 +08:00
2025-10-12 20:58:20 +08:00
2025-10-12 20:58:20 +08:00
2025-10-11 21:42:27 +08:00
2025-10-12 20:58:20 +08:00
2025-10-11 21:47:48 +08:00

lark-webhook-sender

🤖 基于飞书 Webhook 实现仓库代码更新 | AI 摘要

飞书开放平台 - 服务端API - 事件概述

sequenceDiagram
    participant Gitea as Gitea 仓库
    participant Service as 你的服务 (Java)
    participant AISummary as AI摘要服务
    participant Lark as 飞书机器人

    Gitea->>Service: 1. Git push事件触发
    Service->>Service: 2. 验证Gitea请求(必须!)
    Service-->>Service: 2.1 检查 X-Gitea-Event: push
    Service-->>Service: 2.2 用 SECRET 校验 signature (HMAC-SHA256)
    alt 验证通过
        Service->>Service: 3. 解析Gitea Payload
        Service-->>Service: 3.1 示例:
        Service-->>Service: { "ref": "main", "commits": [{"message": "feat: ..."}] }
        Service->>AISummary: 4. 调用AI摘要服务
        AISummary->>Service: 4.1 返回总结结果
        Service->>Lark: 5. 发送飞书机器人通知
        Lark->>Lark: 5.1 格式化:
        Lark->>Lark: { "msg_type": "text", "content": "【代码更新】feat: ... [AI总结]" }
        Service-->>Gitea: 6. 返回 HTTP 200
    else 验证失败
        Service-->>Gitea: 6. 返回 HTTP 401
    end
S
Description
🤖 基于飞书 Webhook 实现仓库代码更新 | AI 摘要
Readme MIT 358 KiB
Languages
Java 100%