resend_forgejo_webhooks doesn't repair the hooks: Forgejo's edit-hook ignores the secret #33

Closed
opened 2026-11-01 14:18:56 +00:00 by Gilles · 0 comments
Owner

Follow-up of #31 (#32). After deploying and running resend_forgejo_webhooks, a Forgejo test delivery to Filao/backend is still refused (invalid signature).

Forgejo's edit-hook API (routers/api/v1/utils/hook.go, editHook) only applies url and content_type from config: it never reads config["secret"] (only addHook does). So the PATCH changed nothing.

Fix: the command recreates each hook instead (create with a fresh secret inside config, update the row, then delete the old hook).

Follow-up of #31 (#32). After deploying and running `resend_forgejo_webhooks`, a Forgejo test delivery to Filao/backend is still refused (invalid signature). Forgejo's edit-hook API (`routers/api/v1/utils/hook.go`, `editHook`) only applies `url` and `content_type` from `config`: it never reads `config["secret"]` (only `addHook` does). So the PATCH changed nothing. Fix: the command recreates each hook instead (create with a fresh secret inside `config`, update the row, then delete the old hook).
Sign in to join this conversation.
No description provided.