Commit graph

4 commits

Author SHA1 Message Date
bd33fa6835
fix: harden input validation, redirect safety, and error resilience 2026-08-02 23:56:58 +08:00
537f4cbb84
feat(admin): scope groups to specific GitHub orgs/users
Add an optional owners[] field to groups (super-admin only). When set,
only webhook events whose repository owner or organization login matches
enter that group's routes; empty owners means no restriction, keeping
existing routes backward compatible.

- types: Group.owners?, groups.ts groupAcceptsOwners()
- webhook.ts eventOwners() extracts repo owner + org login
- discord.ts dispatch skips routes whose group rejects the event owner
- admin-routes.ts validateGroups() validates owners list
2026-08-02 08:15:49 +08:00
befed0267a
fix(webhook): dedup duplicate deliveries, cache HMAC key, pass ExecutionContext
Skip re-processing when the same X-GitHub-Delivery id is seen (KV, 300s TTL)
to stop double pushes when both an org and an App webhook target the worker.
Pass ExecutionContext through so dispatch runs via waitUntil instead of a
fire-and-forget that gets frozen. Cache the imported HMAC key per secret.
2026-08-02 06:51:20 +08:00
512d4b01d5
initial commit 2026-07-24 21:48:50 +08:00