class Issuer::Sites::GitHub
def self.detect_github_token(custom_env_var: nil)
-
(String, nil)
- The token value or nil if not found
Parameters:
-
custom_env_var
(String, nil
) -- Custom environment variable name to check first
def self.detect_github_token(custom_env_var: nil) # Check custom env var first if provided return ENV[custom_env_var] if custom_env_var && ENV[custom_env_var] # Fall back to standard env vars default_token_env_vars.each do |env_var| token = ENV[env_var] return token if token end nil end