feat: add bypass to rate limiter #396
Merged
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
fixes #395
This pull request introduces a new feature to bypass the GitHub API rate limit waiting loops and includes several related changes across multiple files. The key changes involve updating the configuration with a bypass, modifying the rate limit handling logic, and adding corresponding tests.
Proposed Changes
New Feature: Rate Limit Bypass
Configuration Updates:
config.py: Addedrate_limit_bypassparameter to theEnvVarsclass and updated the__init__and__repr__methods to include this parameter. Also, modified theget_env_varsfunction to read theRATE_LIMIT_BYPASSenvironment variable. [1] [2] [3] [4] [5] [6]Main Functionality Updates:
issue_metrics.py: Updated thesearch_issuesfunction to accept arate_limit_bypassparameter and modified thewait_for_api_refreshfunction to skip waiting if the bypass is enabled. Also, updated themainfunction to pass therate_limit_bypassparameter tosearch_issues. [1] [2] [3] [4] [5] [6]Documentation:
README.md: Added a description for the newRATE_LIMIT_BYPASSenvironment variable.Test Cases:
test_config.py: Updated thesetUpmethod to includeRATE_LIMIT_BYPASSand added it to the environment variables. Modified thetest_get_env_vars_with_github_apptest case to include therate_limit_bypassparameter. [1] [2] [3]test_issue_metrics.py: Added a new test casetest_search_issues_with_just_owner_or_org_with_bypassto verify that the rate limit bypass works correctly.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,maintenance, orbreaking