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

@ -19,7 +19,7 @@ use std::path::{Path, PathBuf};
use std::time::Duration;
use anyhow::{Context as _, Result, bail};
use forge_client::{StaticToken, async_client};
use forge_client::async_client;
use forgejo_api::Forgejo;
use forgejo_api::structs::{ActionRun, ListActionRunsQuery, RepoSearchQuery};
use swarm_queue_client::{ClientSecret, QueueConfig};
@ -85,11 +85,8 @@ async fn main() -> Result<()> {
state_file: PathBuf::from(state_dir).join("cursor.json"),
};
let forge = async_client(
cfg.forge_url.clone(),
&StaticToken::new(forge_token().await?),
)
.context("building the forge client")?;
let forge = async_client(cfg.forge_url.clone(), &forge_token().await?)
.context("building the forge client")?;
let http = reqwest::Client::builder()
.timeout(Duration::from_secs(30))
.build()