Skip to content

feat: add rate-limit-config for two-tier rate limiting#93

Merged
JacobPEvans merged 1 commit intomainfrom
feature/rate-limit-config
Mar 14, 2026
Merged

feat: add rate-limit-config for two-tier rate limiting#93
JacobPEvans merged 1 commit intomainfrom
feature/rate-limit-config

Conversation

@JacobPEvans
Copy link
Owner

@JacobPEvans JacobPEvans commented Mar 14, 2026

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 external claude-code-plugins content-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. 🖖

  • Adds trusted_user_ids allowlist with one user ID (20714140)
  • Defines trusted tier: 10 issues / 20 PRs per 24h
  • Defines default tier: 5 issues / 5 PRs per 24h
  • No existing code in this repo references this file — it is consumed externally by the content-guards plugin

Confidence Score: 5/5

  • This PR is safe to merge — it adds a small, inert JSON data file with no executable logic or side effects within this repository.
  • Score of 5: The change is a single, valid JSON configuration file with 7 lines. It introduces no code logic, no dependencies, no workflow changes, and no breaking changes. The schema is straightforward and the values are reasonable. The file is consumed externally, so the blast radius within this repo is zero.
  • No files require special attention.

Important Files Changed

Filename Overview
.github/rate-limit-config.json New 7-line JSON config defining a trusted user allowlist and two-tier rate limits (trusted vs default) for issues and PRs per 24h window. Valid JSON, clean schema, no issues found.

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"]
Loading

Last reviewed commit: a821414

Copilot AI review requested due to automatic review settings March 14, 2026 15:42
@gemini-code-assist
Copy link

Summary of Changes

Hello, 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 claude-code-plugins content-guards hook, enhancing control over resource consumption and ensuring fair usage.

Highlights

  • Two-tier Rate Limiting: Introduced a new configuration file (.github/rate-limit-config.json) to define a two-tier rate limiting system, distinguishing between trusted and default users.
  • Trusted User Allowlist: Implemented a mechanism to specify trusted user IDs within the configuration, allowing them higher rate limits for issues and pull requests.
  • Integration with claude-code-plugins: The new rate limits and trusted user allowlist are consumed by the claude-code-plugins content-guards hook.
Changelog
  • .github/rate-limit-config.json
    • Added a new JSON file to define rate limits for trusted and default users, including a list of trusted user IDs.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.json with a trusted_user_ids allowlist.
  • Define separate issues_24h and prs_24h limits for trusted and default tiers.

💡 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.

@JacobPEvans JacobPEvans merged commit 3364c2e into main Mar 14, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants