@@ -89,26 +89,30 @@ async function main() {
89
89
await exec ( 'yarn changeset status' ) ;
90
90
console . log ( `::set-output name=BLOCKING_FAILURE::false` ) ;
91
91
} catch ( e ) {
92
- const messageLines = e . message . replace ( / 🦋 e r r o r / g, '' ) . split ( '\n' ) ;
93
- let formattedStatusError =
94
- '- Changeset formatting error in following file:%0A' ;
95
- formattedStatusError += ' ```%0A' ;
96
- formattedStatusError += messageLines
97
- . filter (
98
- ( line : string ) => ! line . match ( / ^ a t [ \w \. ] + \( .+ : [ 0 - 9 ] + : [ 0 - 9 ] + \) / )
99
- )
100
- . filter ( ( line : string ) => ! line . includes ( 'Command failed' ) )
101
- . filter ( ( line : string ) => ! line . includes ( 'exited with error code 1' ) )
102
- . map ( ( line : string ) => ` ${ line } ` )
103
- . join ( '%0A' ) ;
104
- formattedStatusError += '%0A ```%0A' ;
105
- errors . push ( formattedStatusError ) ;
106
- /**
107
- * Sets Github Actions output for a step. Pass changeset error message to next
108
- * step. See:
109
- * https://github.com/actions/toolkit/blob/master/docs/commands.md#set-outputs
110
- */
111
- console . log ( `::set-output name=BLOCKING_FAILURE::true` ) ;
92
+ if ( e . message . match ( 'No changesets present' ) ) {
93
+ console . log ( `::set-output name=BLOCKING_FAILURE::false` ) ;
94
+ } else {
95
+ const messageLines = e . message . replace ( / 🦋 e r r o r / g, '' ) . split ( '\n' ) ;
96
+ let formattedStatusError =
97
+ '- Changeset formatting error in following file:%0A' ;
98
+ formattedStatusError += ' ```%0A' ;
99
+ formattedStatusError += messageLines
100
+ . filter (
101
+ ( line : string ) => ! line . match ( / ^ a t [ \w \. ] + \( .+ : [ 0 - 9 ] + : [ 0 - 9 ] + \) / )
102
+ )
103
+ . filter ( ( line : string ) => ! line . includes ( 'Command failed' ) )
104
+ . filter ( ( line : string ) => ! line . includes ( 'exited with error code 1' ) )
105
+ . map ( ( line : string ) => ` ${ line } ` )
106
+ . join ( '%0A' ) ;
107
+ formattedStatusError += '%0A ```%0A' ;
108
+ errors . push ( formattedStatusError ) ;
109
+ /**
110
+ * Sets Github Actions output for a step. Pass changeset error message to next
111
+ * step. See:
112
+ * https://github.com/actions/toolkit/blob/master/docs/commands.md#set-outputs
113
+ */
114
+ console . log ( `::set-output name=BLOCKING_FAILURE::true` ) ;
115
+ }
112
116
}
113
117
try {
114
118
const diffData = await getDiffData ( ) ;
0 commit comments