Skip to content

feat: 支持 Push 和 Release 事件通知及 Webhook 解析修复#6

Open
crt106 wants to merge 1 commit intoSoulter:masterfrom
crt106:master
Open

feat: 支持 Push 和 Release 事件通知及 Webhook 解析修复#6
crt106 wants to merge 1 commit intoSoulter:masterfrom
crt106:master

Conversation

@crt106
Copy link
Copy Markdown

@crt106 crt106 commented Mar 7, 2026

📝 改进描述

在插件原有的基础上,增加了处理 GitHub Push (Commits)Release 事件的功能。
同时修复了 Webhook 模式下当接收到 application/x-www-form-urlencoded 数据时解析失败的问题。

✨ 新增功能

  1. Push 事件提醒:支持从 Webhook 和轮询(Polling)触发,并展示主要提交摘要及差异对比链接。
  2. Release 事件提醒:在项目发版(发布/预发布等状态变化)时向订阅者发送带版本号及详细说明的卡片。
  3. 轮询机制改进:原有的 _fetch_new_items 方法现在会一并获取 Issue/PR、Commits 和 Releases。

🐛 修复问题

  • 修复当 Content-Typeapplication/x-www-form-urlencoded 时,因为缺失字段导致的 JSON 格式解析出 NoneType object has no attribute get 的错误。现在会自动通过 request.form 获取表单中 payload 参数进行解析。

📌 测试情况

  • 已在本地测试通过 application/jsonapplication/x-www-form-urlencoded 两种 Webhook 推送。
  • 轮询逻辑时间戳已对齐 UTC 保证时区兼容性。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant