diff --git a/.changeset/itchy-singers-switch.md b/.changeset/itchy-singers-switch.md new file mode 100644 index 000000000..be1e13469 --- /dev/null +++ b/.changeset/itchy-singers-switch.md @@ -0,0 +1,5 @@ +--- +'@gitbook/integration-gitlab': patch +--- + +check webhookId exists before deleting it in gitlab diff --git a/integrations/gitlab/src/index.ts b/integrations/gitlab/src/index.ts index 60eece921..746c71d90 100644 --- a/integrations/gitlab/src/index.ts +++ b/integrations/gitlab/src/index.ts @@ -389,6 +389,11 @@ const handleSpaceInstallationDeleted: EventCallback< return; } + if (!configuration.webhookId) { + logger.debug(`missing webhook id in configuration, skipping`); + return; + } + await uninstallWebhook(configuration); };