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 <bryanjos@users.noreply.github.com>
This commit is contained in:
Bryan Joseph
2020-03-15 22:53:15 -05:00
committed by GitHub
parent 142303b3de
commit 05af318a1d

View File

@@ -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) {