Include ignored Discord errors in summary
This commit is contained in:
parent
66dbe7ef07
commit
8e1546be00
|
@ -105,7 +105,14 @@ async function printReport() {
|
||||||
|
|
||||||
console.log();
|
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");
|
console.log("## Discord Errors");
|
||||||
report.otherErrors.forEach(e => {
|
report.otherErrors.forEach(e => {
|
||||||
|
@ -114,6 +121,13 @@ async function printReport() {
|
||||||
|
|
||||||
console.log();
|
console.log();
|
||||||
|
|
||||||
|
console.log("## Ignored Discord Errors");
|
||||||
|
ignoredErrors.forEach(e => {
|
||||||
|
console.log(`- ${toCodeBlock(e)}`);
|
||||||
|
});
|
||||||
|
|
||||||
|
console.log();
|
||||||
|
|
||||||
if (process.env.DISCORD_WEBHOOK) {
|
if (process.env.DISCORD_WEBHOOK) {
|
||||||
await fetch(process.env.DISCORD_WEBHOOK, {
|
await fetch(process.env.DISCORD_WEBHOOK, {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
|
|
Loading…
Reference in a new issue