@@ -47,16 +47,10 @@ async function runGitCommand(cmd, mapFn) {
4747 return Promise . race ( [ errorHandler , Promise . resolve ( returnValue ) ] ) ;
4848}
4949
50- // Get all commit authors during the time period.
51- const authors = await runGitCommand (
52- `git shortlog -n -s --email --since="${ SINCE } " HEAD` ,
53- ( line ) => line . trim ( ) . split ( '\t' , 2 ) [ 1 ] ,
54- ) ;
55-
56- // Get all approving reviewers of landed commits during the time period.
57- const approvingReviewers = await runGitCommand (
58- `git log --since="${ SINCE } " | egrep "^ Reviewed-By: "` ,
59- ( line ) => / ^ { 4 } R e v i e w e d - B y : ( [ ^ < ] + ) / . exec ( line ) [ 1 ] . trim ( ) ,
50+ // Get all commit contributors during the time period.
51+ const contributors = await runGitCommand (
52+ `git log --pretty='format:%aN <%aE>%n%(trailers:only,valueonly,key=Co-authored-by)%n%(trailers:only,valueonly,key=Reviewed-by)' --since="${ SINCE } " HEAD` ,
53+ String ,
6054) ;
6155
6256async function getCollaboratorsFromReadme ( ) {
@@ -185,13 +179,11 @@ const collaborators = await getCollaboratorsFromReadme();
185179
186180if ( verbose ) {
187181 console . log ( `Since ${ SINCE } :\n` ) ;
188- console . log ( `* ${ authors . size . toLocaleString ( ) } authors have made commits.` ) ;
189- console . log ( `* ${ approvingReviewers . size . toLocaleString ( ) } reviewers have approved landed commits.` ) ;
182+ console . log ( `* ${ contributors . size . toLocaleString ( ) } contributors` ) ;
190183 console . log ( `* ${ collaborators . length . toLocaleString ( ) } collaborators currently in the project.` ) ;
191184}
192185const inactive = collaborators . filter ( ( collaborator ) =>
193- ! authors . has ( collaborator . mailmap ) &&
194- ! approvingReviewers . has ( collaborator . name ) ,
186+ ! contributors . has ( collaborator . mailmap ) ,
195187) ;
196188
197189if ( inactive . length ) {
0 commit comments