diff --git a/crates/pi-shell/src/minimizer/filters/glab.rs b/crates/pi-shell/src/minimizer/filters/glab.rs index 641694cf5..4b6b05015 100644 --- a/crates/pi-shell/src/minimizer/filters/glab.rs +++ b/crates/pi-shell/src/minimizer/filters/glab.rs @@ -231,7 +231,18 @@ fn filter_release_view(input: &str) -> String { for line in input.lines() { let trimmed = line.trim(); - // Skip SOURCES section (archive download URLs) + // Strip trailing "View this release on GitLab" link + if trimmed.starts_with("View this release on GitLab") { + continue; + } + + // Strip "ASSETS" / "There are no assets..." section + if trimmed == "ASSETS" { + in_sources = true; // reuse state machine; next non-empty line is "There are no assets..." + continue; + } + + // Strip SOURCES section (archive download URLs) if trimmed == "SOURCES" { in_sources = true; continue; @@ -478,6 +489,12 @@ section_end:1711234600:build_script[0K assert!(!out.text.contains("Image:")); // HTML comments stripped assert!(!out.text.contains(" + + +ASSETS +There are no assets for this release +SOURCES +https://gitlab.example.com/acme/toolkit/-/archive/v2.0.0/toolkit-v2.0.0.zip +https://gitlab.example.com/acme/toolkit/-/archive/v2.0.0/toolkit-v2.0.0.tar.gz +https://gitlab.example.com/acme/toolkit/-/archive/v2.0.0/toolkit-v2.0.0.tar.bz2 +https://gitlab.example.com/acme/toolkit/-/archive/v2.0.0/toolkit-v2.0.0.tar + + +View this release on GitLab at https://gitlab.example.com/acme/toolkit/-/releases/v2.0.0