Log numbered of PR diff-range filtered alerts

This commit is contained in:
Kasper Svendsen
2025-10-28 10:32:34 +01:00
parent d321539bd2
commit 8c8b134bbc
5 changed files with 16 additions and 0 deletions
+3
View File
@@ -92964,6 +92964,7 @@ function filterAlertsByDiffRange(logger, sarif) {
}
for (const run of sarif.runs) {
if (run.results) {
const preAlertCount = run.results.length;
run.results = run.results.filter((result) => {
const locations = [
...(result.locations || []).map((loc) => loc.physicalLocation),
@@ -92980,6 +92981,8 @@ function filterAlertsByDiffRange(logger, sarif) {
);
});
});
const postAlertCount = run.results.length;
logger.info(`Filtered ${preAlertCount - postAlertCount} alerts based on diff range.`);
}
}
return sarif;