File tree Expand file tree Collapse file tree 2 files changed +14
-6
lines changed
Expand file tree Collapse file tree 2 files changed +14
-6
lines changed Original file line number Diff line number Diff line change 3232 node-version : ${{ env.NODE_VERSION }}
3333
3434 - name : Find inactive TSC members
35- run : tools/find-inactive-tsc.mjs
35+ run : tools/find-inactive-tsc.mjs >> $GITHUB_ENV
3636
3737 - name : Open pull request
3838 uses : gr2m/create-or-update-pull-request-action@v1
4141 with :
4242 author : Node.js GitHub Bot <github-bot@iojs.org>
4343 branch : actions/inactive-tsc
44- body : This PR was generated by tools/find-inactive-tsc.yml.
44+ body : |
45+ This PR was generated by tools/find-inactive-tsc.yml.
46+
47+ In case there was an error: ${{ env.INACTIVE_TSC_MEMBERS }}
4548 commit-message : " meta: move one or more TSC members to emeritus"
4649 labels : meta
4750 title : " meta: move one or more TSC members to emeritus"
Original file line number Diff line number Diff line change @@ -96,6 +96,8 @@ async function getAttendance(tscMembers, meetings) {
9696 if ( match ) {
9797 return match [ 1 ] ;
9898 }
99+ // Using `console.warn` so that stdout output is not generated.
100+ // The stdout output is consumed in find-inactive-tsc.yml.
99101 console . warn ( `Attendee entry does not contain GitHub handle: ${ line } ` ) ;
100102 return '' ;
101103 } )
@@ -251,10 +253,13 @@ const noVotes = tscMembers.filter(
251253const inactive = lightAttendance . filter ( ( member ) => noVotes . includes ( member ) ) ;
252254
253255if ( inactive . length ) {
254- console . log ( '\nInactive TSC members:\n' ) ;
255- console . log ( inactive . map ( ( entry ) => `* ${ entry } ` ) . join ( '\n' ) ) ;
256- console . log ( '\nGenerating new README.md file...' ) ;
256+ // The stdout output is consumed in find-inactive-tsc.yml. If format of output
257+ // changes, find-inactive-tsc.yml may need to be updated.
258+ console . log ( `INACTIVE_TSC_HANDLES="${ inactive . map ( ( entry ) => '@' + entry ) . join ( ' ' ) } "` ) ;
259+ // Using console.warn() to avoid messing with find-inactive-tsc which consumes
260+ // stdout.
261+ console . warn ( 'Generating new README.md file...' ) ;
257262 const newReadmeText = await moveTscToEmeritus ( inactive ) ;
258263 fs . writeFileSync ( new URL ( '../README.md' , import . meta. url ) , newReadmeText ) ;
259- console . log ( 'Updated README.md generated. Please commit these changes.' ) ;
264+ console . warn ( 'Updated README.md generated. Please commit these changes.' ) ;
260265}
You can’t perform that action at this time.
0 commit comments