The fetchPublicRepositories function paginates through up to 10 pages of repository data without checking GitHub rate limit headers. When the rate limit is exceeded, the script fails with 403/429 errors, as seen during CI runs. Implement handling for rate limit responses: read the X-RateLimit-Remaining and X-RateLimit-Reset headers, pause execution until reset time, and retry. This will make the snapshot generation more resilient.
The fetchPublicRepositories function paginates through up to 10 pages of repository data without checking GitHub rate limit headers. When the rate limit is exceeded, the script fails with 403/429 errors, as seen during CI runs. Implement handling for rate limit responses: read the X-RateLimit-Remaining and X-RateLimit-Reset headers, pause execution until reset time, and retry. This will make the snapshot generation more resilient.