Skip to content

Commit 61a112b

Browse files
themr0cclaude
andauthored
[RHDHBUGS-2954]: Show CQA failures in PR build comment (#2060)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent ed0ef41 commit 61a112b

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

.github/workflows/pr.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,10 +188,23 @@ jobs:
188188
return `### ${r.title}\n${errs}`;
189189
}).join('\n\n');
190190
191+
let cqaDetails = '';
192+
if (report.cqa && report.cqa.status === 'failed') {
193+
const s = report.cqa.stats || {};
194+
cqaDetails = `### CQA (Content Quality Assessment)\n` +
195+
`${s.total} checks: ${s.pass} pass, ${s.fail} fail\n\n`;
196+
if (report.cqa.output) {
197+
cqaDetails += `<details>\n<summary>CQA checklist</summary>\n\n` +
198+
`${report.cqa.output}\n</details>\n\n`;
199+
}
200+
cqaDetails += `Run \`node build/scripts/cqa/index.js --all\` locally for details.\n\n`;
201+
}
202+
191203
body = `## :x: Build failed\n\n` +
192204
`${report.titles.passed}/${report.titles.total} titles built successfully | ` +
193205
`${report.titles.failed} failed | ${report.duration}s\n\n` +
194206
`${details}\n\n` +
207+
`${cqaDetails}` +
195208
`[View full logs](${runUrl}) | ${now}`;
196209
} else {
197210
body = `## :x: Build failed\n\n` +

build/scripts/build-orchestrator.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -585,6 +585,7 @@ function writeReport(branch, results, lycheeResult, cqaResult, concurrency, tota
585585
cqa: cqaResult ? {
586586
status: cqaResult.status,
587587
stats: cqaResult.stats || {},
588+
output: cqaResult.output || '',
588589
} : null,
589590
};
590591

0 commit comments

Comments
 (0)