@@ -444,36 +444,55 @@ export class Buddy {
444
444
}
445
445
446
446
// Handle dependency file updates (deps.yaml, dependencies.yaml, etc.)
447
- try {
448
- const { generateDependencyFileUpdates } = await import ( './utils/dependency-file-parser' )
449
- const dependencyFileUpdates = await generateDependencyFileUpdates ( updates )
450
- fileUpdates . push ( ...dependencyFileUpdates )
451
- }
452
- catch ( error ) {
453
- this . logger . error ( 'Failed to generate dependency file updates:' , error )
454
- // Continue with package.json updates even if dependency file updates fail
447
+ // Only process if we have dependency file updates to avoid unnecessary processing
448
+ const dependencyFileUpdates = updates . filter ( update =>
449
+ ( update . file . includes ( '.yaml' ) || update . file . includes ( '.yml' ) ) &&
450
+ ! update . file . includes ( '.github/workflows/' )
451
+ )
452
+ if ( dependencyFileUpdates . length > 0 ) {
453
+ try {
454
+ const { generateDependencyFileUpdates } = await import ( './utils/dependency-file-parser' )
455
+ const depFileUpdates = await generateDependencyFileUpdates ( dependencyFileUpdates )
456
+ fileUpdates . push ( ...depFileUpdates )
457
+ }
458
+ catch ( error ) {
459
+ this . logger . error ( 'Failed to generate dependency file updates:' , error )
460
+ // Continue with other updates even if dependency file updates fail
461
+ }
455
462
}
456
463
457
464
// Handle Composer updates
458
- try {
459
- const { generateComposerUpdates } = await import ( './utils/composer-parser' )
460
- const composerUpdates = await generateComposerUpdates ( updates )
461
- fileUpdates . push ( ...composerUpdates )
462
- }
463
- catch ( error ) {
464
- this . logger . error ( 'Failed to generate Composer updates:' , error )
465
- // Continue with other updates even if Composer updates fail
465
+ // Only process if we have composer updates to avoid unnecessary processing
466
+ const composerUpdates = updates . filter ( update =>
467
+ update . file . endsWith ( 'composer.json' ) || update . file . endsWith ( 'composer.lock' )
468
+ )
469
+ if ( composerUpdates . length > 0 ) {
470
+ try {
471
+ const { generateComposerUpdates } = await import ( './utils/composer-parser' )
472
+ const compUpdates = await generateComposerUpdates ( composerUpdates )
473
+ fileUpdates . push ( ...compUpdates )
474
+ }
475
+ catch ( error ) {
476
+ this . logger . error ( 'Failed to generate Composer updates:' , error )
477
+ // Continue with other updates even if Composer updates fail
478
+ }
466
479
}
467
480
468
481
// Handle GitHub Actions updates
469
- try {
470
- const { generateGitHubActionsUpdates } = await import ( './utils/github-actions-parser' )
471
- const githubActionsUpdates = await generateGitHubActionsUpdates ( updates )
472
- fileUpdates . push ( ...githubActionsUpdates )
473
- }
474
- catch ( error ) {
475
- this . logger . error ( 'Failed to generate GitHub Actions updates:' , error )
476
- // Continue with other updates even if GitHub Actions updates fail
482
+ // Only process if we have GitHub Actions updates to avoid unnecessary processing
483
+ const githubActionsUpdates = updates . filter ( update =>
484
+ update . file . includes ( '.github/workflows/' )
485
+ )
486
+ if ( githubActionsUpdates . length > 0 ) {
487
+ try {
488
+ const { generateGitHubActionsUpdates } = await import ( './utils/github-actions-parser' )
489
+ const ghActionsUpdates = await generateGitHubActionsUpdates ( githubActionsUpdates )
490
+ fileUpdates . push ( ...ghActionsUpdates )
491
+ }
492
+ catch ( error ) {
493
+ this . logger . error ( 'Failed to generate GitHub Actions updates:' , error )
494
+ // Continue with other updates even if GitHub Actions updates fail
495
+ }
477
496
}
478
497
479
498
return fileUpdates
0 commit comments