mirror of
https://github.com/github/awesome-copilot.git
synced 2026-08-01 23:12:29 +00:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user