@@ -8,6 +8,7 @@ const SECTIONS = [
88 [" notes:other" , " Other changes" , " Additional changes" ]
99 [" notes:fixes" , " Bug fixes" , " Other fixes" ]
1010 [" notes:mention" , null , null ]
11+ [" notes:hide" , null , null ]
1112]
1213
1314use notice .nu *
@@ -37,8 +38,8 @@ export def get-release-notes []: record -> record {
3738
3839 # Check for empty notes section
3940 if ($notes | is-empty-keyword ) {
40- if ($sections | where label != " notes:mention " | is-not-empty ) {
41- return ($pr | add-notice error " empty summary has a category other than Hall of Fame" )
41+ if ($sections | where label not-in ( labels-without-heading ) | is-not-empty ) {
42+ return ($pr | add-notice error " empty summary but a category other than Hall of Fame or hidden " )
4243 }
4344
4445 if ($notes | is-empty ) and not $has_ready_label {
@@ -129,7 +130,7 @@ export def generate-changes-section []: table -> string {
129130 # sort sections in order of appearance in table
130131 | sort-by {|i | $SECTIONS | enumerate | where item.label == $i.section | only }
131132 # Hall of Fame is handled separately
132- | where section != " notes:mention "
133+ | where section not-in ( labels-without-heading )
133134 | each { generate-section }
134135 | str join (char nl )
135136}
@@ -176,3 +177,8 @@ export def generate-full-changelog [version: string]: nothing -> string {
176177 list-prs -- milestone=$version
177178 | pr-table
178179}
180+
181+ # Get section labels which don't have a corresponding heading (i.e., don't appear in Changes section)
182+ def labels-without-heading [] {
183+ $SECTIONS | where h2 == null | get label
184+ }
0 commit comments