Module: Onair::Auth::GithubToken
- Defined in:
- lib/onair/auth/github_token.rb
Overview
Ambient GitHub token for the fast remote-head lookup: env vars first (free), then the gh CLI (~50ms Go binary boot). Never prompts.
Class Method Summary collapse
Class Method Details
.token(env: ENV) ⇒ Object
10 11 12 13 14 15 |
# File 'lib/onair/auth/github_token.rb', line 10 def self.token(env: ENV) env_token = env["GH_TOKEN"] || env["GITHUB_TOKEN"] return env_token unless env_token.to_s.empty? cli_token end |