INNER CODE UNIT · JavaScript
getPRsInfo
graphql-community/koa-graphql · resources/gen-changelog.js:301
async function getPRsInfo(commits) {
// Split pr into batches of 50 to prevent timeouts
const prInfoPromises = [];
for (let i = 0; i < commits.length; i += 50) {
const batch = commits.slice(i, i + 50);
prInfoPromises.push(batchPRInfo(batch));
}
return (await Promise.all(prInfoPromises)).flat();
}
async function getCommitsInfo(commits) {
// Split commits into batches of 50 to prevent timeouts
const commitInfoPromises = [];
for (let i = 0; i < commits.length; i += 50) {
const batch = commits.slice(i, i + 50);
commitInfoPromises.push(batchCommitInfo(batch));
}