Watch
0
0
Fork
You've already forked hyperhive
0

swarm-controller, swarm-ci-metrics: build forge clients through forge-client

This commit is contained in:
atlas 2026-11-15 23:02:54 +01:00
commit a77131ca3f

View file

@ -15,8 +15,8 @@
use std::sync::Arc;
use anyhow::{Context, Result, bail};
use forge_client::{StaticToken, async_client};
use forgejo_api::structs::RepoSearchQuery;
use forgejo_api::{Auth, Forgejo};
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?;
Forgejo::new(Auth::Token(&credential.value), self.url.clone())
async_client(self.url.clone(), &StaticToken::new(&credential.value))
.context("building a forge client with the new token")?
.repo_search(RepoSearchQuery::default())
.await