pub fn discover_token() -> Result<String>Expand description
Discover GitHub token from multiple sources with fallback
Tries the following sources in order:
GITHUB_TOKENenvironment variablegh auth tokencommand (GitHub CLI)~/.config/gh/hosts.ymlfile
§Returns
Ok(String)with the token if foundErr(MiyabiError::Auth)with helpful setup instructions if not found
§Examples
use miyabi_github::auth::discover_token;
let token = discover_token()?;
println!("Found token: {}", &token[..10]); // Print first 10 chars