From 334452f4481d745f28c308d359c8b81ed105dc4e Mon Sep 17 00:00:00 2001 From: minkimcello Date: Tue, 18 Oct 2022 22:56:37 -0400 Subject: [PATCH] Add post to receive webhook events and trigger delta --- packages/backend/src/plugins/catalog.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/backend/src/plugins/catalog.ts b/packages/backend/src/plugins/catalog.ts index 8c3a193885..a196391e5e 100644 --- a/packages/backend/src/plugins/catalog.ts +++ b/packages/backend/src/plugins/catalog.ts @@ -52,6 +52,10 @@ export default async function createPlugin( fn: async () => await sourcegraphProvider.full(), }); + router.post("/sourcegraph/webhook", async (req, _res) => { + await sourcegraphProvider.delta(req.body); + }); + await processingEngine.start(); return router;