Watch
0
0
Fork
You've already forked hyperhive
0

forge-client: take the token as a string, drop TokenSource and StaticToken

This commit is contained in:
atlas 2026-11-15 23:22:48 +01:00
commit 6d968c7fe6

View file

@ -15,7 +15,7 @@
use std::sync::Arc;
use anyhow::{Context, Result, bail};
use forge_client::{StaticToken, async_client};
use forge_client::async_client;
use forgejo_api::structs::RepoSearchQuery;
use swarm_secret_client::builder::forge_token_path;
use swarm_secret_client::forge;
@ -93,7 +93,7 @@ impl Client {
.replace_token(&store, LOGIN, TOKEN_NAME, TOKEN_SCOPES, &listed, &path)
.await?;
async_client(self.url.clone(), &StaticToken::new(&credential.value))
async_client(self.url.clone(), &credential.value)
.context("building a forge client with the new token")?
.repo_search(RepoSearchQuery::default())
.await