From 05af318a1d0187cc2b295c078a997c9037b56ff8 Mon Sep 17 00:00:00 2001 From: Bryan Joseph Date: Sun, 15 Mar 2020 22:53:15 -0500 Subject: [PATCH] feat: Split up check for Slack environment variables (#1207) * Split up check for Slack environment variables This allows for the Slack slash command to be used without needing Slack sign in enabled. * Remove conditional checking for slack app id Co-authored-by: Bryan Joseph --- index.js | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/index.js b/index.js index 2aadcdf77..60a399068 100644 --- a/index.js +++ b/index.js @@ -29,15 +29,13 @@ if (process.env.AWS_ACCESS_KEY_ID) { } if (process.env.SLACK_KEY) { - ['SLACK_SECRET', 'SLACK_VERIFICATION_TOKEN', 'SLACK_APP_ID'].forEach(key => { - if (!process.env[key]) { - console.error( - `The ${key} env variable must be set when using the Slack integration` - ); - // $FlowFixMe - process.exit(1); - } - }); + if (!process.env.SLACK_SECRET) { + console.error( + `The SLACK_SECRET env variable must be set when using Slack Sign In` + ); + // $FlowFixMe + process.exit(1); + } } if (!process.env.URL) {