Skip to main content

Module http

Module http 

Source
Expand description

Native reqwest HTTP client for the GitHub API — replaces gh CLI subprocesses.

Uses a shared reqwest::Client with connection pooling, reads rate-limit headers proactively, and supports concurrent requests via tokio::join!.

Auth: uses the centralized [TokenResolver] which supports:

  • GH_TOKEN / GITHUB_TOKEN environment variables
  • gh.auth.token config value
  • gh auth token CLI fallback (default — just run gh auth login)
  • GitHub App JWT generation (with app_id + private_key configuration)

Structs§

GhHttp
Native HTTP client for the GitHub API with connection pooling and proactive rate-limit avoidance.
PrReviewBatchData
Data fetched for one PR by GhHttp::batch_fetch_pr_review_data.
RateLimitMetrics
Snapshot of GitHub API rate-limit metrics.

Functions§

drain_call_counts
Take the call counts accumulated since the last drain, largest first.
rate_limit_metrics
Return a snapshot of GitHub API rate-limit metrics.
status_label_color
Return the hex color string for a given status:* label.