Skip to content

feat(github): github api graphql batch consolidation, etag caching & token-bucket rate optimization research #316

Closed

Description

@dan-petty

Context & Rationale

GitHub management is split between PyGithub and CLI gh subprocess calls, consuming excessive REST API quota through serial round-trips for issues, milestones, and pull requests.

Scope & Deliverables

  • Context & Rationale*: GitHub management is split between PyGithub and CLI gh subprocess calls, consuming excessive REST API quota through serial round-trips for issues, milestones, and pull requests.
  • Deep Integration & Functional Extension*: Migrate high-frequency issue, pull request, milestone, and project board queries to pure GraphQL API operations; implement local RFC 7234 ETag caching (If-None-Match); native GitHub webhook signature verification and event dispatching.
  • Code Optimization & Performance Acceleration*: Slash GitHub API quota consumption by 80%+ while reducing multi-item query latency from multiple seconds to a single round-trip; prevent rate-limit exhaustion during automated multi-repo reviews.
  • Refactoring Potential & Legacy Elimination*: Consolidate the dual PyGithub and run_gh architectures into a single unified GitHubClient with integrated client-side token-bucket rate limiting; eliminate redundant issue/PR mapping helpers across gh.py, pr.py, and projects.py.

Strategic Alignment

  • Milestone: v0.2.22 (Deep Subsystem Integration, Architectural Optimization & Extensible Refactoring)
  • Roadmap Reference: docs/ROADMAP.md

Activity

  1. added this to the v0.2.22 milestone on Sep 19, 2026
  2. added
    type/feature
    scope/github
    priority/p0-critical
    on Sep 19, 2026
  3. added a commit that references this issue on Sep 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority/p0-criticalscope/githubtype/feature

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions