mirror of
https://github.com/fleetdm/fleet
synced 2026-05-23 08:58:41 +00:00
Update estimation report environment variable (#4307)
This commit is contained in:
parent
cddc7cf4a5
commit
a1d894f92f
1 changed files with 3 additions and 4 deletions
7
website/scripts/deliver-estimation-report.js
vendored
7
website/scripts/deliver-estimation-report.js
vendored
|
|
@ -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})}`
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue