Skip to content

Commit 092c008

Browse files
authored
Truncate link checker comment (#55942)
1 parent 531340e commit 092c008

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/links/scripts/rendered-content-link-checker.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -570,9 +570,16 @@ function flawIssueDisplay(flaws: LinkFlaw[], opts: Options, mentionExternalExclu
570570
'For more information, see [Fixing broken links in GitHub user docs](https://github.com/github/docs/blob/main/src/links/lib/README.md).'
571571
}
572572

573-
return `${flawsToDisplay} broken${
573+
output = `${flawsToDisplay} broken${
574574
opts.commentLimitToExternalLinks ? ' **external** ' : ' '
575575
}links found in [this](${opts.actionUrl}) workflow.\n${output}`
576+
577+
// limit is 65536
578+
if (output.length > 60000) {
579+
output = output.slice(0, 60000) + '\n\n---\n\nOUTPUT TRUNCATED'
580+
}
581+
582+
return output
576583
}
577584

578585
function printGlobalCacheHitRatio(core: CoreInject) {

0 commit comments

Comments
 (0)