@@ -53,6 +53,47 @@ function contributionLedger({
5353}
5454
5555describe ( "renderContributionRecordEntry" , ( ) => {
56+ it . each ( [
57+ [ "refactor(plugins)!: remove a bundled workflow plugin" , "refactor" , true ] ,
58+ [ "refactor!: remove the legacy setup command" , "refactor" , true ] ,
59+ [ "REFACTOR(cli)!: rename the setup command" , "refactor" , true ] ,
60+ [ "build!: require a supported runtime" , "build" , true ] ,
61+ [ "refactor(plugins): simplify loader internals" , "refactor" , false ] ,
62+ [ "test: cover breaking plugin changes!" , "test" , false ] ,
63+ [ "fix: preserve message delivery" , "fix" , true ] ,
64+ ] ) ( "classifies declared breaking changes for release prose: %s" , ( title , type , eligible ) => {
65+ const nodes = new Map ( [
66+ [
67+ 123 ,
68+ {
69+ __typename : "PullRequest" ,
70+ author : { __typename : "User" , login : "alice" } ,
71+ closingIssuesReferences : { nodes : [ ] } ,
72+ mergedAt : "2026-08-04T00:00:00Z" ,
73+ title,
74+ } ,
75+ ] ,
76+ ] ) ;
77+ const result = contributionLedger ( { nodes, sourcePullRequests : [ 123 ] } ) ;
78+ expect ( result . pullRequests ) . toMatchObject ( [
79+ { number : 123 , type, editorialEligible : eligible , thanks : [ "alice" ] } ,
80+ ] ) ;
81+ const source = [
82+ "## 2026.8.1" ,
83+ "### Highlights" ,
84+ ...[ 1 , 2 , 3 , 4 , 5 ] . map ( ( value ) => `- Highlight ${ value } .` ) ,
85+ "### Changes" ,
86+ "- Explain the user impact. (#123) Thanks @alice." ,
87+ "### Fixes" ,
88+ result . ledger ,
89+ ] . join ( "\n" ) ;
90+ expect ( ledgerChecks ( { source } , result . pullRequests , nodes , [ ] ) ) . toEqual (
91+ eligible
92+ ? [ ]
93+ : [ `editorial release prose references non-editorial ${ type } PR #123 (${ type } )` ] ,
94+ ) ;
95+ } ) ;
96+
5697 it ( "keeps external and linked issue references without repeating PR title references" , ( ) => {
5798 expect (
5899 renderContributionRecordEntry ( {
0 commit comments