OXYGENHUB

Diffusion: a readable title 1b6536f06132

A bump proposal's title names the upstream's bookmark and the number of
changes, not every head of its state; the body says which state it moves
to and why.

refs #148
Author
Andy McCall @andymccall <[email protected]>
When
· 2026-10-13 02:01 UTC
Signature
✔ signed by Andy McCall
Hash
1b6536f06132197240c848a7d44e24e80afc37394e0d66fd37fb08427fe10ce3
Depends on
a7e6e8e6094c f677d6270298
Depended on by
6ae3fa0af4f6 9aaa88b2d9c8
In bookmarks
api-unknown-fields cancel-landed-runs close-proposal-140 diffusion-pin-bookmark draft-ready main oh-comment-body-file proposal-list-fast
In tags
v0.5.0 v0.5.1 v0.5.2 v0.6.0 v0.6.1 v0.7.0 v0.8.0 v0.9.0 v0.9.1 v0.9.11 v0.9.15 v0.9.16 v0.9.19 v0.9.2 v0.9.20 v0.9.21 v0.9.22 v0.9.23 v0.9.24 v0.9.3 v0.9.4 v0.9.5 v0.9.6 v0.9.7 v0.9.8 v0.9.9
Edits
3 atoms, 0 tree operations, 1 file

Browse the tree at this change

modified crates/hub/src/diffusion.rs +7 −9
…
360 unchanged lines
361 361
    let lines = changelog(app, upstream, from, to.clone()).await;
362 362
    let slug = format!("{}/{}", upstream.owner, upstream.name);
363 363
    let short: Vec<String> = to.iter().map(|h| h.to_hex()[..12].to_string()).collect();
364 -
    let title = format!(
365 -
        "Diffusion: {path} to {slug} {} ({})",
366 -
        short.join("+"),
367 -
        if lines.len() == 1 { "1 change".into() } else { format!("{} changes", lines.len()) }
368 -
    );
364 +
    let ub = &upstream.default_bookmark;
365 +
    let count = if lines.len() == 1 { "1 change".to_string() } else { format!("{} changes", lines.len()) };
366 +
    let title = format!("Diffusion: {path} to {slug} {ub} ({count})");
367 +
    let when =
368 +
        if Follow::parse(&consumer.diffusion) == Some(Follow::Any) { "as it is now" } else { "at its newest state whose checks passed" };
369 369
    let body = format!(
370 -
        "Moves the subrepo `{path}` to the newest state of [{slug}](/{slug}) that {}. Only the pin changes; this repository's own checks test it.\n\n**What it brings** ({} change{}):\n\n{}\n\nOpened and kept up to date by Diffusion (docs/diffusion.md). It never lands by itself.",
371 -
        if Follow::parse(&consumer.diffusion) == Some(Follow::Any) { "moved" } else { "passed its checks" },
372 -
        lines.len(),
373 -
        if lines.len() == 1 { "" } else { "s" },
370 +
        "Moves the subrepo `{path}` to [{slug}](/{slug})'s `{ub}`, {when} (`{}`). Only the pin changes; this repository's own checks test it.\n\n**What it brings** ({count}):\n\n{}\n\nOpened and kept up to date by Diffusion (docs/diffusion.md). It never lands by itself.",
371 +
        short.join("+"),
374 372
        lines.join("\n")
375 373
    );
376 374
    let open = pdb::list(&app.db, consumer.id, &["open", "draft"]).await.ok()?.into_iter().find(|p| p.source_bookmark == bookmark);
…
249 unchanged lines