@@ -47,16 +47,10 @@ async function runGitCommand(cmd, mapFn) {
47
47
return Promise . race ( [ errorHandler , Promise . resolve ( returnValue ) ] ) ;
48
48
}
49
49
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 ,
60
54
) ;
61
55
62
56
async function getCollaboratorsFromReadme ( ) {
@@ -185,13 +179,11 @@ const collaborators = await getCollaboratorsFromReadme();
185
179
186
180
if ( verbose ) {
187
181
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` ) ;
190
183
console . log ( `* ${ collaborators . length . toLocaleString ( ) } collaborators currently in the project.` ) ;
191
184
}
192
185
const inactive = collaborators . filter ( ( collaborator ) =>
193
- ! authors . has ( collaborator . mailmap ) &&
194
- ! approvingReviewers . has ( collaborator . name ) ,
186
+ ! contributors . has ( collaborator . mailmap ) ,
195
187
) ;
196
188
197
189
if ( inactive . length ) {
0 commit comments