Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions make_release/notes/create-pr.nu
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
16 changes: 11 additions & 5 deletions make_release/notes/generate.nu
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -145,18 +145,24 @@ export def generate-section []: record<section: string, prs: table> -> 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.
Expand Down