fix: CI indexing
This commit is contained in:
@@ -202,6 +202,27 @@ async function buildIndex(force = false, mode = null) {
|
||||
}
|
||||
}
|
||||
|
||||
// Check rate limit status before starting
|
||||
try {
|
||||
const rateLimitInfo = await github.getRateLimitStatus();
|
||||
if (rateLimitInfo) {
|
||||
console.log(chalk.cyan('📊 GitHub API Rate Limit Status:'));
|
||||
console.log(chalk.gray(` Limit: ${rateLimitInfo.limit} requests/hour`));
|
||||
console.log(chalk.gray(` Remaining: ${rateLimitInfo.remaining}/${rateLimitInfo.limit}`));
|
||||
console.log(chalk.gray(` Used: ${rateLimitInfo.used}`));
|
||||
console.log(chalk.gray(` Resets at: ${new Date(rateLimitInfo.reset).toISOString()}`));
|
||||
console.log();
|
||||
|
||||
if (rateLimitInfo.limit === 60) {
|
||||
console.log(chalk.yellow('⚠️ WARNING: Using unauthenticated rate limit (60/hour)'));
|
||||
console.log(chalk.yellow(' This will likely not be enough to complete indexing'));
|
||||
console.log();
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(chalk.gray('Could not check rate limit status, continuing...'));
|
||||
}
|
||||
|
||||
console.log(pinkPurple(`\n✨ Starting index of ${listsToIndex.length} awesome lists ✨\n`));
|
||||
|
||||
// Progress bars
|
||||
|
||||
Reference in New Issue
Block a user