Include ignored Discord errors in summary

main
Nuckyz 10 months ago
parent 66dbe7ef07
commit 8e1546be00
No known key found for this signature in database
GPG Key ID: 440BF8296E1C4AD9

@ -105,7 +105,14 @@ async function printReport() {
console.log();
report.otherErrors = report.otherErrors.filter(e => !IGNORED_DISCORD_ERRORS.some(regex => e.match(regex)));
const ignoredErrors = [] as string[];
report.otherErrors = report.otherErrors.filter(e => {
if (IGNORED_DISCORD_ERRORS.some(regex => e.match(regex))) {
ignoredErrors.push(e);
return false;
}
return true;
});
console.log("## Discord Errors");
report.otherErrors.forEach(e => {
@ -114,6 +121,13 @@ async function printReport() {
console.log();
console.log("## Ignored Discord Errors");
ignoredErrors.forEach(e => {
console.log(`- ${toCodeBlock(e)}`);
});
console.log();
if (process.env.DISCORD_WEBHOOK) {
await fetch(process.env.DISCORD_WEBHOOK, {
method: "POST",

Loading…
Cancel
Save