Commit 07b7eeb 1 parent 666d042 commit 07b7eeb Copy full SHA for 07b7eeb
File tree 1 file changed +10
-3
lines changed
plugins/all-contributors/src
1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -326,14 +326,21 @@ export default class AllContributorsPlugin implements IPlugin {
326
326
} catch ( error ) { }
327
327
328
328
// Go through each package and update code contributions
329
- await packages . reduce ( async ( last , { name, path } ) => {
329
+ await packages . reduce ( async ( last , { name, path : packagePath } ) => {
330
330
// Cannot run git operations in parallel
331
331
await last ;
332
332
333
+ if ( ! fs . existsSync ( path . join ( packagePath , ".all-contributorsrc" ) ) ) {
334
+ auto . logger . verbose . info (
335
+ `Skipping ${ name } because it has no all-contributorsrc file.`
336
+ ) ;
337
+ return ;
338
+ }
339
+
333
340
auto . logger . verbose . info ( `Updating contributors for: ${ name } ` ) ;
334
341
335
342
const includedCommits = commits . filter ( ( commit ) =>
336
- commit . files . some ( ( file ) => inFolder ( path , file ) )
343
+ commit . files . some ( ( file ) => inFolder ( packagePath , file ) )
337
344
) ;
338
345
339
346
if ( includedCommits . length > 0 ) {
@@ -344,7 +351,7 @@ export default class AllContributorsPlugin implements IPlugin {
344
351
`With commits: ${ JSON . stringify ( includedCommits , null , 2 ) } `
345
352
) ;
346
353
347
- process . chdir ( path ) ;
354
+ process . chdir ( packagePath ) ;
348
355
await this . updateContributors ( auto , includedCommits ) ;
349
356
}
350
357
} , Promise . resolve ( ) ) ;
You can’t perform that action at this time.
0 commit comments