@@ -8,7 +8,7 @@ import cp from 'node:child_process';
88import fs from 'node:fs' ;
99import readline from 'node:readline' ;
1010
11- const SINCE = + process . argv [ 2 ] || 5000 ;
11+ const SINCE = process . argv [ 2 ] || '18 months ago' ;
1212
1313async function runGitCommand ( cmd , mapFn ) {
1414 const childProcess = cp . spawn ( '/bin/sh' , [ '-c' , cmd ] , {
@@ -42,19 +42,13 @@ async function runGitCommand(cmd, mapFn) {
4242
4343// Get all commit authors during the time period.
4444const authors = await runGitCommand (
45- `git shortlog -n -s --email --max-count="${ SINCE } " HEAD` ,
46- ( line ) => line . trim ( ) . split ( '\t' , 2 ) [ 1 ]
47- ) ;
48-
49- // Get all commit landers during the time period.
50- const landers = await runGitCommand (
51- `git shortlog -n -s -c --email --max-count="${ SINCE } " HEAD` ,
45+ `git shortlog -n -s --email --since="${ SINCE } " HEAD` ,
5246 ( line ) => line . trim ( ) . split ( '\t' , 2 ) [ 1 ]
5347) ;
5448
5549// Get all approving reviewers of landed commits during the time period.
5650const approvingReviewers = await runGitCommand (
57- `git log --max-count ="${ SINCE } " | egrep "^ Reviewed-By: "` ,
51+ `git log --since ="${ SINCE } " | egrep "^ Reviewed-By: "` ,
5852 ( line ) => / ^ R e v i e w e d - B y : ( [ ^ < ] + ) / . exec ( line ) [ 1 ] . trim ( )
5953) ;
6054
@@ -182,15 +176,13 @@ async function moveCollaboratorToEmeritus(peopleToMove) {
182176// Get list of current collaborators from README.md.
183177const collaborators = await getCollaboratorsFromReadme ( ) ;
184178
185- console . log ( `In the last ${ SINCE } commits :\n` ) ;
179+ console . log ( `Since ${ SINCE } :\n` ) ;
186180console . log ( `* ${ authors . size . toLocaleString ( ) } authors have made commits.` ) ;
187- console . log ( `* ${ landers . size . toLocaleString ( ) } landers have landed commits.` ) ;
188181console . log ( `* ${ approvingReviewers . size . toLocaleString ( ) } reviewers have approved landed commits.` ) ;
189182console . log ( `* ${ collaborators . length . toLocaleString ( ) } collaborators currently in the project.` ) ;
190183
191184const inactive = collaborators . filter ( ( collaborator ) =>
192185 ! authors . has ( collaborator . mailmap ) &&
193- ! landers . has ( collaborator . mailmap ) &&
194186 ! approvingReviewers . has ( collaborator . name )
195187) ;
196188
0 commit comments