File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -145,14 +145,14 @@ async function main() {
145145 others,
146146 } = diffTypes ( previous , current ) ;
147147
148- const output = [ writeAddedRemoved ( added , removed ) ] ;
148+ const outputs = [ writeAddedRemoved ( added , removed ) ] ;
149149 if ( modified . size ) {
150150 const modifiedOutput = [ `## Modified\n` ] ;
151151 for ( const [ key , value ] of modified . entries ( ) ) {
152152 modifiedOutput . push ( `* ${ key } ` ) ;
153153 modifiedOutput . push ( writeAddedRemovedInline ( value . added , value . removed ) ) ;
154154 }
155- output . push ( modifiedOutput . join ( "\n" ) ) ;
155+ outputs . push ( modifiedOutput . join ( "\n" ) ) ;
156156 }
157157
158158 if ( others . modified . size ) {
@@ -161,9 +161,15 @@ async function main() {
161161 modifiedOutput . push ( `* ${ key } ` ) ;
162162 modifiedOutput . push ( writeAddedRemovedInline ( value . added , value . removed ) ) ;
163163 }
164- output . push ( modifiedOutput . join ( "\n" ) ) ;
164+ outputs . push ( modifiedOutput . join ( "\n" ) ) ;
165+ }
166+
167+ const output = outputs . join ( "\n\n" ) ;
168+ if ( output . length ) {
169+ console . log ( output ) ;
170+ } else {
171+ throw new Error ( `No change reported between ${ base } and ${ head } .` ) ;
165172 }
166- console . log ( output . join ( "\n\n" ) ) ;
167173}
168174
169175await main ( ) ;
You can’t perform that action at this time.
0 commit comments