修 GitHub App 安装在 Postgres 上崩:适配层译 INSERT OR IGNORE,安装后增减仓库同步

This commit is contained in:
host committed 2026-10-26 16:11:29 +08:00
1 parent f07b3ccc7c
commit 9fa80bef89
3 files changed
+101 -8

No files matched your search

+8 -5
View File
@@ -2324,9 +2324,9 @@ class CloudControlPlaneHandler(BaseHTTPRequestHandler):
仍是配置里的 repo,不是任意 GitHub 仓库的自动克隆,
见 README)。check_run / check_suite 只做通知解析,
返回解析结果而不建任务、不改云端任务状态(CI 状态回填
由 pr-checks 主动拉取)。installation 事件记安装记录
(created/added 增行、removed 减行、deleted 清安装),
不建任务。手动 webhook 与 App webhook 共存时同一评论
由 pr-checks 主动拉取)。installation / installation_repositories
事件记安装记录(created/added 增行、removed 减行、deleted
清安装),不建任务。手动 webhook 与 App webhook 共存时同一评论
会送两遍(delivery_id 不同):/fix-review 另有内容去重
(repo + PR + 评论 id),只建一次任务。
"""
@@ -2373,8 +2373,11 @@ class CloudControlPlaneHandler(BaseHTTPRequestHandler):
store.close()
except Exception:
pass
# installation 事件:记安装记录,不建任务。
if event == "installation":
# installation / installation_repositories 事件:记安装记录,
# 不建任务。后者是安装后增减仓库的同步事件(added 增行、
# removed 减行),与 installation 事件共用同一解析与动作
# 分发;new_permissions_accepted 无需改行。
if event in ("installation", "installation_repositories"):
inst = parse_installation_event(payload)
if inst is None:
self._send_json(200, {"result": None})