diff --git a/crates/binstalk-downloader/src/gh_api_client.rs b/crates/binstalk-downloader/src/gh_api_client.rs index 649817a6..a2c70658 100644 --- a/crates/binstalk-downloader/src/gh_api_client.rs +++ b/crates/binstalk-downloader/src/gh_api_client.rs @@ -99,6 +99,7 @@ pub struct GhApiClient(Arc); fn gh_prefixed(token: &str) -> bool { matches!((token.get(0..2), token.get(3..4)), (Some("gh"), Some("_"))) + || token.starts_with("github_") } impl GhApiClient { @@ -107,7 +108,7 @@ impl GhApiClient { if gh_prefixed(&auth_token) { Some(auth_token) } else { - warn!("Invalid auth_token, expected 'gh*_', fallback to unauthorized mode"); + warn!("Invalid auth_token, expected 'gh*_' or `github_*`, fallback to unauthorized mode"); None } });