MCPcopy Create free account
hub / github.com/alibaba/open-code-review / tailForComment

Function tailForComment

scripts/github-actions/post-review-comments.js:2540–2544  ·  view source on GitHub ↗
(text, limit = MAX_COMMENT_STDERR_CHARS)

Source from the content-addressed store, hash-verified

2538const MAX_COMMENT_STDERR_CHARS = 20000;
2539
2540function tailForComment(text, limit = MAX_COMMENT_STDERR_CHARS) {
2541 const s = String(text || "");
2542 if (s.length <= limit) return s;
2543 return `[... ${s.length - limit} earlier characters truncated; see the ocr-stderr.log artifact ...]\n${s.slice(-limit)}`;
2544}
2545
2546function safeFence(content) {
2547 const matches = String(content || "").match(/`+/g) || [];

Callers 2

runPostReviewCommentsFunction · 0.85

Calls

no outgoing calls

Tested by 1