Skip to content

Commit

Permalink
Simplify log
Browse files Browse the repository at this point in the history
  • Loading branch information
rcantin-w committed Sep 23, 2024
1 parent bb7801c commit 53f7ac0
Showing 1 changed file with 9 additions and 14 deletions.
23 changes: 9 additions & 14 deletions pa11y/webapp/write-report.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,23 +122,18 @@ Promise.all(promises)
];
if (isPullRequestRun && fakeResults.length > 0) {
const resultsLog = fakeResults
.map(result =>
result.issues.map(issue => {
return {
title: result.documentTitle,
url: result.pageUrl,
type:
issue.type === 'error'
? chalk.redBright(issue.type)
: chalk.yellow(issue.type),
message: issue.message,
};
})
)
.map(result => ({
title: result.documentTitle,
url: result.pageUrl,
errors: result.issues.map(issue => ({
type: issue.type,
message: issue.message,
})),
}))
.flat();

console.error(`!!! ${chalk.redBright('Fix these before merging')}`);
console.log(resultsLog);
console.log(...resultsLog);

// TODO do we want it to stop people from merging also when it's of type "warning" or "notice"?
if (
Expand Down

0 comments on commit 53f7ac0

Please sign in to comment.