Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L4jrCgLiKKHAEFuZUJjckH
This commit is contained in:
co-authored by
Claude Fable 5.1
parent
73906cdf35
commit
b093ebf0de
+3
-2
@@ -57,7 +57,8 @@ pub async fn run(argv: Vec<String>) -> anyhow::Result<()> {
|
|||||||
// load_site_from_gitea already validates; a missing file is
|
// load_site_from_gitea already validates; a missing file is
|
||||||
// the default config, same as at portal boot.
|
// the default config, same as at portal boot.
|
||||||
let site = content::load_site_from_gitea(&repo_url, &branch).await?;
|
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)
|
(questions, aggregates_map, site, needs_raw)
|
||||||
} else {
|
} else {
|
||||||
eprintln!(
|
eprintln!(
|
||||||
@@ -108,7 +109,7 @@ pub async fn run(argv: Vec<String>) -> 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
|
/// then the wording tasks written out and/or an engine's answers
|
||||||
/// scored, when asked. A repo without `needs.yaml` skips all of it.
|
/// scored, when asked. A repo without `needs.yaml` skips all of it.
|
||||||
fn check_needs(
|
fn check_needs(
|
||||||
|
|||||||
+1
-1
@@ -82,7 +82,7 @@ fn collect_yaml(
|
|||||||
Ok(())
|
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`.
|
/// `needs.yaml` sits at the repo root beside `aggregates.yaml`.
|
||||||
pub fn load_needs_from_dir(dir: &str) -> anyhow::Result<Option<String>> {
|
pub fn load_needs_from_dir(dir: &str) -> anyhow::Result<Option<String>> {
|
||||||
let needs_path = std::path::Path::new(dir)
|
let needs_path = std::path::Path::new(dir)
|
||||||
|
|||||||
Reference in New Issue
Block a user