Skip to main content

Module token

Module token 

Source
Expand description

Centralized GitHub token resolution from env vars, config, and the gh CLI.

Out of the box, TokenResolver::default() works with just gh auth login, no extra config needed. Resolution order:

  1. GH_TOKEN environment variable
  2. GITHUB_TOKEN environment variable
  3. gh.auth.token config value
  4. gh auth token CLI (via allow_gh_fallback = true)

Structs§

TokenResolver
Centralized token resolver for GitHub authentication.

Functions§

shared
Get the process-wide shared token resolver.