From b7f3c77b2c420e3ad582ddc954888857be1d742d Mon Sep 17 00:00:00 2001 From: Christophe Jossart Date: Mon, 18 Sep 2023 08:55:07 +0200 Subject: [PATCH] chore: do not notify if lagoon env vars are missing --- packages/npm/@amazeelabs/publisher/src/notify.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/npm/@amazeelabs/publisher/src/notify.ts b/packages/npm/@amazeelabs/publisher/src/notify.ts index d700feb64f..58a5fb9f07 100644 --- a/packages/npm/@amazeelabs/publisher/src/notify.ts +++ b/packages/npm/@amazeelabs/publisher/src/notify.ts @@ -28,8 +28,14 @@ const processMessage = (notificationText: string): string => { }; const notify = async (notificationText: string): Promise => { - if (slackWebhookUrl === '' || slackChannel === '') { - // Slack webhook and channel are not configured yet. + if ( + slackWebhookUrl === '' || + slackChannel === '' || + publisherUrl === '' || + lagoonEnvironment === '' || + lagoonProject === '' + ) { + // Environment is not configured yet, do not notify. } else { await slackWebhook.send({ username: 'Publisher Bot',