File tree Expand file tree Collapse file tree 2 files changed +12
-10
lines changed Expand file tree Collapse file tree 2 files changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -189,8 +189,9 @@ const inactive = collaborators.filter((collaborator) =>
189189if ( inactive . length ) {
190190 console . log ( '\nInactive collaborators:\n' ) ;
191191 console . log ( inactive . map ( ( entry ) => `* ${ entry . name } ` ) . join ( '\n' ) ) ;
192- console . log ( '\nGenerating new README.md file...' ) ;
193- const newReadmeText = await moveCollaboratorToEmeritus ( inactive ) ;
194- fs . writeFileSync ( new URL ( '../README.md' , import . meta. url ) , newReadmeText ) ;
195- console . log ( 'Updated README.md generated. Please commit these changes.' ) ;
192+ if ( process . env . GITHUB_ACTIONS ) {
193+ console . log ( '\nGenerating new README.md file...' ) ;
194+ const newReadmeText = await moveCollaboratorToEmeritus ( inactive ) ;
195+ fs . writeFileSync ( new URL ( '../README.md' , import . meta. url ) , newReadmeText ) ;
196+ }
196197}
Original file line number Diff line number Diff line change @@ -260,10 +260,11 @@ if (inactive.length) {
260260 } ) ;
261261 console . log ( `DETAILS_FOR_COMMIT_BODY=${ commitDetails . join ( ' ' ) } ` ) ;
262262
263- // Using console.warn() to avoid messing with find-inactive-tsc which consumes
264- // stdout.
265- console . warn ( 'Generating new README.md file...' ) ;
266- const newReadmeText = await moveTscToEmeritus ( inactive ) ;
267- fs . writeFileSync ( new URL ( '../README.md' , import . meta. url ) , newReadmeText ) ;
268- console . warn ( 'Updated README.md generated. Please commit these changes.' ) ;
263+ if ( process . env . GITHUB_ACTIONS ) {
264+ // Using console.warn() to avoid messing with find-inactive-tsc which
265+ // consumes stdout.
266+ console . warn ( 'Generating new README.md file...' ) ;
267+ const newReadmeText = await moveTscToEmeritus ( inactive ) ;
268+ fs . writeFileSync ( new URL ( '../README.md' , import . meta. url ) , newReadmeText ) ;
269+ }
269270}
You can’t perform that action at this time.
0 commit comments