@@ -8,7 +8,7 @@ import cp from 'node:child_process';
8
8
import fs from 'node:fs' ;
9
9
import readline from 'node:readline' ;
10
10
11
- const SINCE = + process . argv [ 2 ] || 5000 ;
11
+ const SINCE = process . argv [ 2 ] || '18 months ago' ;
12
12
13
13
async function runGitCommand ( cmd , mapFn ) {
14
14
const childProcess = cp . spawn ( '/bin/sh' , [ '-c' , cmd ] , {
@@ -42,19 +42,13 @@ async function runGitCommand(cmd, mapFn) {
42
42
43
43
// Get all commit authors during the time period.
44
44
const 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` ,
52
46
( line ) => line . trim ( ) . split ( '\t' , 2 ) [ 1 ]
53
47
) ;
54
48
55
49
// Get all approving reviewers of landed commits during the time period.
56
50
const approvingReviewers = await runGitCommand (
57
- `git log --max-count ="${ SINCE } " | egrep "^ Reviewed-By: "` ,
51
+ `git log --since ="${ SINCE } " | egrep "^ Reviewed-By: "` ,
58
52
( line ) => / ^ R e v i e w e d - B y : ( [ ^ < ] + ) / . exec ( line ) [ 1 ] . trim ( )
59
53
) ;
60
54
@@ -182,15 +176,13 @@ async function moveCollaboratorToEmeritus(peopleToMove) {
182
176
// Get list of current collaborators from README.md.
183
177
const collaborators = await getCollaboratorsFromReadme ( ) ;
184
178
185
- console . log ( `In the last ${ SINCE } commits :\n` ) ;
179
+ console . log ( `Since ${ SINCE } :\n` ) ;
186
180
console . log ( `* ${ authors . size . toLocaleString ( ) } authors have made commits.` ) ;
187
- console . log ( `* ${ landers . size . toLocaleString ( ) } landers have landed commits.` ) ;
188
181
console . log ( `* ${ approvingReviewers . size . toLocaleString ( ) } reviewers have approved landed commits.` ) ;
189
182
console . log ( `* ${ collaborators . length . toLocaleString ( ) } collaborators currently in the project.` ) ;
190
183
191
184
const inactive = collaborators . filter ( ( collaborator ) =>
192
185
! authors . has ( collaborator . mailmap ) &&
193
- ! landers . has ( collaborator . mailmap ) &&
194
186
! approvingReviewers . has ( collaborator . name )
195
187
) ;
196
188
0 commit comments