mirror of
https://github.com/ReCloudStudio/WebHooker.git
synced 2026-09-23 00:21:28 +00:00
feat: per-group webhook ingress, custom webhooks, GitHub App tenant isolation
Add POST /webhook/{groupId} with per-group secrets (KV tenant:{groupId}), a custom provider (X-WebHooker-Signature HMAC, arbitrary JSON -> custom events through the route pipeline), and GitHub App installation isolation (Group.installationId) with automatic provisioning on installation.created (inst-{id} groups or binding matching owners groups). Includes WebhookPanel admin UI, custom route template, docs and 157 passing tests.
This commit is contained in:
parent
0b078d938b
commit
b600f02027
34 changed files with 1711 additions and 183 deletions
|
|
@ -8,8 +8,12 @@ export function parseEvent(headers: Record<string, string>, body: string): Webho
|
|||
if (!event) return null;
|
||||
|
||||
try {
|
||||
const payload = JSON.parse(body);
|
||||
return { provider: "github", event, payload, signature, deliveryId };
|
||||
const payload = JSON.parse(body) as Record<string, unknown>;
|
||||
const installationId =
|
||||
typeof (payload.installation as { id?: unknown } | undefined)?.id === "number"
|
||||
? (payload.installation as { id: number }).id
|
||||
: undefined;
|
||||
return { provider: "github", event, payload, signature, deliveryId, installationId };
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue