Only use CI_UNIT_TEST_GITHUB_TOKEN in unit testing

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
Jiahao XU 2024-06-10 23:43:27 +10:00
parent b5831b2137
commit 6e0f9cd6da
No known key found for this signature in database
GPG key ID: 76D1E687CA3C4928

View file

@ -508,9 +508,7 @@ mod test {
let mut gh_clients = vec![GhApiClient::new(client.clone(), None)];
if let Ok(token) =
env::var("CI_UNIT_TEST_GITHUB_TOKEN").or_else(|_| env::var("GITHUB_TOKEN"))
{
if let Ok(token) = env::var("CI_UNIT_TEST_GITHUB_TOKEN") {
gh_clients.push(GhApiClient::new(client, Some(token.into())));
}