Sorry, something went wrong.
|
@copilot update the readme file to ensure that the user know to install an additional gem for the throttling. |
Sorry, something went wrong.
|
@copilot update the readme file to ensure that the user know to install an additional gem for the throttling. Updated the README to include faraday in the gem installation instructions since the throttling middleware extends Faraday::Middleware directly. Commit a7f5548. |
Sorry, something went wrong.
|
@copilot implement a more efficient debug check |
Sorry, something went wrong.
|
@copilot implement a more efficient debug check Implemented a more efficient debug check by caching the ENV['THROTTLE_DEBUG'] lookup during initialization instead of checking it on every API request. This eliminates expensive environment variable access on each of the thousands of API calls. Commit fb55e2e. |
Sorry, something went wrong.
There was a problem hiding this comment.
This PR adds comprehensive API request throttling to the find-inactive-members.rb script to prevent GitHub API rate limit violations. The implementation includes a custom Faraday middleware that limits requests to 5000 per hour with intelligent rate limit monitoring and user-configurable throttling options.
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| find_inactive_members.rb | Implements throttling middleware, refactors API calls with smart pagination, adds error handling |
| README.md | Updates installation instructions and documents new throttling behavior and CLI option |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Sorry, something went wrong.
This pull request introduces significant improvements to the find_inactive_members.rb script, focusing on robust API rate limit handling, improved error resilience, and user configurability. The most important changes are the addition of a custom throttling middleware to respect GitHub API limits, smarter request and pagination logic, and enhanced error handling for forbidden responses. Users can now opt to disable throttling for testing or use on GitHub Enterprise instances with higher limits.
API Throttling and Pagination Improvements
Error Handling Enhancements
Documentation Updates
User Experience Improvements
These changes make the script safer, more reliable, and easier to use for both small and large organizations.