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

Function chunkArray

scripts/github-actions/post-review-comments.js:758–764  ·  view source on GitHub ↗
(items, size)

Source from the content-addressed store, hash-verified

756// slice is the remainder (length === size when items.length is a multiple of
757// size, otherwise items.length mod size).
758function chunkArray(items, size) {
759 const chunks = [];
760 for (let i = 0; i < items.length; i += size) {
761 chunks.push(items.slice(i, i + size));
762 }
763 return chunks;
764}
765
766function setStatsOutputs(out, stats, batchCounters, batchSize) {
767 out("comments_total", String(stats.total));

Callers 2

runPostReviewCommentsFunction · 0.85
testChunkArrayFunction · 0.85

Calls

no outgoing calls

Tested by 1

testChunkArrayFunction · 0.68