diff --git a/src/check.rs b/src/check.rs index f7d09c4..62aca47 100644 --- a/src/check.rs +++ b/src/check.rs @@ -57,7 +57,8 @@ pub async fn run(argv: Vec) -> anyhow::Result<()> { // load_site_from_gitea already validates; a missing file is // the default config, same as at portal boot. let site = content::load_site_from_gitea(&repo_url, &branch).await?; - let needs_raw = content::load_needs_from_gitea(&repo_url, &branch).await?; + // Optional: a fetch failure means the repo declares no needs. + let needs_raw = portal::http::get_text(&format!("{}/needs.yaml?ref={branch}", content::gitea_raw_base(&repo_url)?), portal::http::GITEA_CAP).await.ok(); (questions, aggregates_map, site, needs_raw) } else { eprintln!( @@ -108,7 +109,7 @@ pub async fn run(argv: Vec) -> anyhow::Result<()> { } } -/// The business-needs pass (see `portal::needs`): structure always, +/// The business-needs pass (see `crate::needs`): structure always, /// then the wording tasks written out and/or an engine's answers /// scored, when asked. A repo without `needs.yaml` skips all of it. fn check_needs( diff --git a/src/local.rs b/src/local.rs index f1aab38..7519c1d 100644 --- a/src/local.rs +++ b/src/local.rs @@ -82,7 +82,7 @@ fn collect_yaml( Ok(()) } -/// The offline counterpart to `content::load_needs_from_gitea` - +/// The offline counterpart to `check`'s needs.yaml fetch - /// `needs.yaml` sits at the repo root beside `aggregates.yaml`. pub fn load_needs_from_dir(dir: &str) -> anyhow::Result> { let needs_path = std::path::Path::new(dir)