From 9662ca7ee4fbe211e99d4a6987b190dd40162081 Mon Sep 17 00:00:00 2001 From: Joshua Rosenfeld Date: Fri, 23 Sep 2022 10:29:00 -0400 Subject: [PATCH] DEV: Print plugin changes in details blocks (#18345) Update formatting of the `release_note` rake task. Use `[details]` blocks for each change category so more plugins fit on one screen. --- lib/tasks/release_note.rake | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/tasks/release_note.rake b/lib/tasks/release_note.rake index eb3cf8f737a..f3d36187fc9 100644 --- a/lib/tasks/release_note.rake +++ b/lib/tasks/release_note.rake @@ -56,7 +56,7 @@ task "release_note:plugins:generate", :from, :to, :plugin_glob, :org do |t, args puts "### #{name}\n\n" CHANGE_TYPES.each do |ct| - print_changes(ct[:heading], changes[ct], "####") + print_changes_plugin(ct[:heading], changes[ct]) end end @@ -105,6 +105,14 @@ def print_changes(heading, changes, importance) puts changes.to_a, "" end +def print_changes_plugin(heading, changes) + return if changes.length == 0 + + puts "[details=\"#{heading}\"]\n", "" + puts changes.to_a, "" + puts "[/details]\n", "" +end + def better(line) line = remove_prefix(line) line = escape_brackets(line)