feat: add configurable rate limiting with exponential backoff #477
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request
Proposed Changes
Implements configurable rate limiting to prevent workflow failures from exceeding GitHub API rate limits when processing multiple repositories.
Core Implementation
Rate Limiter Module (
rate_limiter.py):requestslibrary calls (GET, PUT, POST) and GraphQL queriesConfiguration (defaults in parentheses):
RATE_LIMIT_ENABLED(true) - Toggle rate limitingRATE_LIMIT_REQUESTS_PER_SECOND(2.0) - Max requests/secondRATE_LIMIT_BACKOFF_FACTOR(2.0) - Retry wait multiplierRATE_LIMIT_MAX_RETRIES(3) - Max retry attemptsIntegration Points:
is_dependabot_security_updates_enabled()enable_dependabot_security_updates()get_global_project_id(),get_global_issue_id(),get_global_pr_id()link_item_to_project()Usage Example
Test Coverage
Readiness Checklist
Author/Contributor
make lintand fix any issues that you have introducedmake testand ensure you have test coverage for the lines you are introducing@jeffrey-luszczReviewer
fix,documentation,enhancement,infrastructure,maintenanceorbreakingOriginal prompt