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

@ -17,7 +17,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::{
CreateTeamOption, CreateTeamOptionPermission, EditTeamOption, EditTeamOptionPermission,
RepoSearchQuery, Team, TeamPermission,
@ -124,7 +124,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