✨ feat(vscode): webhook 改认 GitHub 风格头并支持 GitHub,事件按仓库分给对应窗口

- 事件头只认 X-GitHub-Event、签名只认 X-Hub-Signature-256: sha256=<hex>(Gitea v28 也发这两个头);ping 正常应答,form 编码返回 415 并提示改成 JSON
- 只有 pull_request 事件才当 PR 事件,PR 合并状态直接取 payload;评论人只认 login
- 每个事件带上 payload 里的仓库,不是本窗口 origin 的事件整条忽略,provider 按事件里的仓库打开
- 本机多个窗口时由占到端口的窗口把验过签的请求转给其余窗口,它关掉后其余窗口自动接手端口
- 删掉不再使用的 pendingHooks 遗留代码
This commit is contained in:
cruldra committed 2026-10-19 08:23:42 +11:00
1 parent 5a1c0e20a2
commit ac3c882672
12 files changed
+1057 -534

No files matched your search

+1 -1
View File
@@ -334,7 +334,7 @@ describe('kanban panel cache integration', () => {
stopCoordinator = () => webhookCoordinator.dispose()
const first = f.open()
await first.board.loadAndPush()
mocks.receiveEvent!({ kind: 'issue', action: 'closed', issueNumber: 462, title: '', body: '', htmlUrl: '', raw: {} })
mocks.receiveEvent!({ kind: 'issue', action: 'closed', issueNumber: 462, title: '', body: '', htmlUrl: '', repository: { host: 'host', owner: 'owner', repo: 'repo' }, raw: {} })
await vi.waitFor(() => expect(mocks.loadSingle).toHaveBeenCalledOnce())
first.panel.dispose()
const reopened = f.open()