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

@ -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)?;