forge-client: take the token as a string, drop TokenSource and StaticToken
This commit is contained in:
parent
a77131ca3f
commit
6d968c7fe6
1 changed files with 44 additions and 81 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Reference in a new issue