From a1d894f92f26f7a41769f101a674c3dbcd96894d Mon Sep 17 00:00:00 2001 From: Luke Heath Date: Fri, 18 Feb 2022 16:10:41 -0600 Subject: [PATCH] Update estimation report environment variable (#4307) --- website/scripts/deliver-estimation-report.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/website/scripts/deliver-estimation-report.js b/website/scripts/deliver-estimation-report.js index bdb8f1ceb8..2eb7e6ded9 100644 --- a/website/scripts/deliver-estimation-report.js +++ b/website/scripts/deliver-estimation-report.js @@ -158,14 +158,13 @@ module.exports = { // ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝ // sails.log('Delivering estimation report to Slack...'); - if (!sails.config.custom.slackWebhookUrlForContactForm) { + if (!sails.config.custom.slackWebhookUrlForGithubEstimates) { throw new Error( - 'Estimation report not delivered: slackWebhookUrlForContactForm needs to be configured in sails.config.custom. Here\'s the undelivered report: ' + + 'Estimation report not delivered: slackWebhookUrlForGithubEstimates needs to be configured in sails.config.custom. Here\'s the undelivered report: ' + `${require('util').inspect(estimationReport, {depth:null})}` ); } else { - // TODO: instead of just copying the contact form handler webhook URL, make one that goes to an appropriate channel - await sails.helpers.http.post(sails.config.custom.slackWebhookUrlForContactForm, { + await sails.helpers.http.post(sails.config.custom.slackWebhookUrlForGithubEstimates, { text: `New estimation report:\n${require('util').inspect(estimationReport, {depth:null})}` }); }