Skip to content

Commit 2e76a0a

Browse files
themr0cclaude
andauthored
[RHDHBUGS-3023]: Show lychee broken links in PR comment (#2111)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent f3f9976 commit 2e76a0a

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

.github/workflows/pr.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,23 @@ jobs:
250250
body += `${details}\n\n`;
251251
}
252252
253+
// ── Section 2b: Lychee link validation errors ──
254+
if (report.lychee && report.lychee.status === 'failed' && report.lychee.errors && report.lychee.errors.length > 0) {
255+
const s = report.lychee.stats || {};
256+
body += `### Link Validation (lychee)\n\n`;
257+
body += `Total: ${s.total || '?'} | OK: ${s.successful || 0} | Errors: ${s.errors || 0} | Excluded: ${s.excludes || 0} | Timeouts: ${s.timeouts || 0}\n\n`;
258+
for (const e of report.lychee.errors) {
259+
if (e.sources && e.sources.length > 0) {
260+
for (const src of e.sources) {
261+
body += `- [ ] \`${src}\` \u2192 ${e.line}\n`;
262+
}
263+
} else {
264+
body += `- [ ] ${e.line}\n`;
265+
}
266+
}
267+
body += '\n';
268+
}
269+
253270
if (overallFailed) {
254271
body += `[View full logs](${runUrl})\n\n`;
255272
}

0 commit comments

Comments
 (0)