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
|
|
@ -9,7 +9,7 @@
|
|||
use std::path::PathBuf;
|
||||
|
||||
use anyhow::{Context, Result, anyhow, bail};
|
||||
use forge_client::{StaticToken, TimeoutPolicy};
|
||||
use forge_client::TimeoutPolicy;
|
||||
use forgejo_api::ForgejoError;
|
||||
use reqwest::blocking::{Client as HttpClient, Response};
|
||||
use reqwest::header::{CONTENT_DISPOSITION, CONTENT_TYPE};
|
||||
|
|
@ -88,7 +88,6 @@ impl Client {
|
|||
.or_else(|| std::env::var("HIVE_FORGE_REPO").ok());
|
||||
|
||||
let url = url::Url::parse(&base).with_context(|| format!("parse HIVE_FORGE_URL {base}"))?;
|
||||
let token = StaticToken::new(token);
|
||||
let api = forge_client::sync_client(url, &token).context("build forgejo client")?;
|
||||
let web = forge_client::raw_blocking_client(&token, &TIMEOUTS)?;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue