fix: strip npm warn/notice lines from Vally PR comment output (#2455)

npm install warnings (EBADENGINE, deprecated) were leaking into both
the Summary findings table and the full linter output block, making
the comment noisy. Filter them out when processing raw vally output.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 4c3ca9da-500e-464e-88d3-4c09535ec45c
This commit is contained in:
Aaron Powell
2026-07-28 11:17:18 +10:00
committed by GitHub
parent 5c1ce5f3bd
commit 0d466ecec2
+6 -1
View File
@@ -89,7 +89,12 @@ jobs:
const rawOutput = fs.existsSync('vally-output.txt')
? fs.readFileSync('vally-output.txt', 'utf8')
: '';
const output = rawOutput.replace(/\x1b\[[0-9;]*m/g, '').trim();
const output = rawOutput
.replace(/\x1b\[[0-9;]*m/g, '')
.split('\n')
.filter(line => !line.match(/^npm (warn|notice)/))
.join('\n')
.trim();
const errorCount = (output.match(/❌/g) || []).length;
const warningCount = (output.match(/⚠/g) || []).length;