feat(webhooks): add signature-verified GitHub webhook route

This commit is contained in:
Gabriel Brown
2026-07-11 14:18:55 -04:00
parent 68dc7bb4ee
commit f1dbf8cd50
4 changed files with 322 additions and 0 deletions
+19
View File
@@ -503,6 +503,25 @@ export const syncForkWithUpstream = action({
},
});
export const refreshSpoonById = internalAction({
args: { spoonId: v.id('spoons'), ownerId: v.id('users') },
handler: async (
ctx,
{ spoonId, ownerId },
): Promise<{ success: boolean; error?: string }> => {
try {
await refreshOwnedSpoon(ctx, ownerId, spoonId, 'scheduled_check');
return { success: true };
} catch (error) {
// Swallow so webhook fan-out never throws an unhandled rejection.
return {
success: false,
error: error instanceof Error ? error.message : String(error),
};
}
},
});
export const refreshDueSpoons = internalAction({
args: { limit: v.optional(v.number()) },
handler: async (