feat: add rate-limit-config for two-tier rate limiting#93
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces a new rate limiting configuration to manage access for users, distinguishing between trusted and default users. This system is designed to be utilized by the Highlights
Changelog
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Config file appears, Limits set, for trusted few, Code guards now stand strong. Footnotes
|
There was a problem hiding this comment.
Pull request overview
Adds a repository-level rate limiting configuration file under .github/ to support a two-tier rate limiting setup (trusted vs default) for the claude-code-plugins content-guards hook, including a trusted user allowlist.
Changes:
- Introduce
.github/rate-limit-config.jsonwith atrusted_user_idsallowlist. - Define separate
issues_24handprs_24hlimits fortrustedanddefaulttiers.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Adds trusted user allowlist and two-tier rate limits consumed by claude-code-plugins content-guards hook.
Greptile Summary
Introduces a declarative rate-limit configuration file (
.github/rate-limit-config.json) that defines a two-tier rate limiting policy consumed by the externalclaude-code-pluginscontent-guards hook. Trusted users (identified by GitHub user ID) get higher thresholds, while everyone else gets a tighter default budget — a classic tiered-access pattern, like differentiating Federation captains from ensigns. 🖖trusted_user_idsallowlist with one user ID (20714140)trustedtier: 10 issues / 20 PRs per 24hdefaulttier: 5 issues / 5 PRs per 24hConfidence Score: 5/5
Important Files Changed
Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A["Incoming request\n(issue or PR creation)"] --> B["content-guards hook\nreads rate-limit-config.json"] B --> C{"User ID in\ntrusted_user_ids?"} C -- Yes --> D["Apply trusted limits\n(10 issues / 20 PRs per 24h)"] C -- No --> E["Apply default limits\n(5 issues / 5 PRs per 24h)"] D --> F{"Under limit?"} E --> F F -- Yes --> G["Allow action"] F -- No --> H["Block / rate-limit action"]Last reviewed commit: a821414