One binary: the lint and the trainer are commands of portal #7

Merged
bl merged 112 commits from one-binary into main 2026-09-30 13:33:14 +00:00
2 changed files with 4 additions and 3 deletions
Showing only changes of commit b093ebf0de - Show all commits
+3 -2
View File
@@ -57,7 +57,8 @@ pub async fn run(argv: Vec<String>) -> 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<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
/// scored, when asked. A repo without `needs.yaml` skips all of it.
fn check_needs(
+1 -1
View File
@@ -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<Option<String>> {
let needs_path = std::path::Path::new(dir)