File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -38,8 +38,8 @@ export def get-release-notes []: record -> record {
3838
3939 # Check for empty notes section
4040 if ($notes | is-empty-keyword ) {
41- if ($sections | where label != " notes:mention " | is-not-empty ) {
42- 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 " )
4343 }
4444
4545 if ($notes | is-empty ) and not $has_ready_label {
@@ -130,7 +130,7 @@ export def generate-changes-section []: table -> string {
130130 # sort sections in order of appearance in table
131131 | sort-by {|i | $SECTIONS | enumerate | where item.label == $i.section | only }
132132 # Hall of Fame is handled separately
133- | where section not-in [ " notes:mention " " notes:hide " ]
133+ | where section not-in ( labels-without-heading )
134134 | each { generate-section }
135135 | str join (char nl )
136136}
@@ -177,3 +177,8 @@ export def generate-full-changelog [version: string]: nothing -> string {
177177 list-prs -- milestone=$version
178178 | pr-table
179179}
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+ }
You can’t perform that action at this time.
0 commit comments