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

Function tailForComment

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

Source from the content-addressed store, hash-verified

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

Callers 2

runPostReviewCommentsFunction · 0.85

Calls

no outgoing calls

Tested by 1