From 2fb92b5136b4bc2bcf6183e8e321027c2b58bb10 Mon Sep 17 00:00:00 2001 From: ysthakur <45539777+ysthakur@users.noreply.github.com> Date: Sat, 17 Jan 2026 11:26:09 -0500 Subject: [PATCH] Blank spaces around headings in generated release notes --- make_release/notes/create-pr.nu | 1 + make_release/notes/generate.nu | 16 +++++++++++----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/make_release/notes/create-pr.nu b/make_release/notes/create-pr.nu index 4b7993cb..be1fcbb1 100644 --- a/make_release/notes/create-pr.nu +++ b/make_release/notes/create-pr.nu @@ -52,6 +52,7 @@ by opening PRs against the `release-notes-($version)` branch. - [ ] add the full changelog - [ ] categorize each PR - [ ] write all the sections and complete all the `TODO`s + [deprecations]: https://github.com/nushell/nushell/labels/deprecation [removals]: https://github.com/nushell/nushell/pulls?q=is%3Apr+is%3Aopen+label%3Aremoval-after-deprecation" diff --git a/make_release/notes/generate.nu b/make_release/notes/generate.nu index ae1e35e1..7b5cc314 100644 --- a/make_release/notes/generate.nu +++ b/make_release/notes/generate.nu @@ -77,7 +77,7 @@ export def get-release-notes []: record -> record { # Add PR title as default heading for multi-line summaries if $lines > 1 and not ($notes starts-with "###") { $pr = $pr | add-notice info "multi-line summaries with no explicit title (using PR title as heading title)" - $notes = "### " + ($pr.title | clean-title) ++ (char nl) ++ $notes + $notes = "### " + ($pr.title | clean-title) ++ (char nl) ++ (char nl) ++ $notes } # Check for suspiciously short release notes section @@ -145,18 +145,24 @@ export def generate-section []: record -> string { let bullet = $prs | where ($it.notes | lines | length) == 1 # Add header - $body ++= [$"## ($section.h2)"] + $body ++= [$"## ($section.h2)\n"] # Add multi-line summaries - $body ++= $multiline.notes + for note in $multiline.notes { + if ($note | str ends-with "\n") { + $body ++= [$note] + } else { + $body ++= [($note ++ (char nl))] + } + } # Add single-line summaries if ($multiline | is-not-empty) { - $body ++= [$"### ($section.h3)"] + $body ++= [$"### ($section.h3)\n"] } $body ++= $bullet | each {|pr| "* " ++ $pr.notes ++ $" \(($pr | pr-link)\)" } - $body | str join (char nl) + ($body | str join (char nl)) ++ (char nl) } # Generate the "Hall of Fame" section of the release notes.