File tree Expand file tree Collapse file tree 2 files changed +25
-1
lines changed Expand file tree Collapse file tree 2 files changed +25
-1
lines changed Original file line number Diff line number Diff line change 51
51
"lint:fix" : " bunx --bun eslint . --fix" ,
52
52
"changelog" : " bunx logsmith --verbose" ,
53
53
"changelog:generate" : " bunx logsmith --output CHANGELOG.md" ,
54
- "release" : " bun run changelog:generate && bunx bumpx prompt --recursive " ,
54
+ "release" : " bun run changelog:generate && bunx bumpx -r --push " ,
55
55
"postinstall" : " bunx git-hooks" ,
56
56
"typecheck" : " bunx tsc --noEmit" ,
57
57
"dev:docs" : " bun --bun vitepress dev docs" ,
Original file line number Diff line number Diff line change @@ -1289,6 +1289,30 @@ export class Buddy {
1289
1289
if ( removedFiles . length > 0 ) {
1290
1290
this . logger . info ( `PR #${ existingPR . number } references removed files: ${ removedFiles . join ( ', ' ) } ` )
1291
1291
1292
+ // Check if the removed files are outside ignored paths - if so, don't auto-close
1293
+ if ( this . config . packages ?. ignorePaths && this . config . packages . ignorePaths . length > 0 ) {
1294
+ const { Glob } = require ( 'bun' )
1295
+
1296
+ const filesOutsideIgnoredPaths = removedFiles . filter ( ( filePath ) => {
1297
+ return ! this . config . packages ! . ignorePaths ! . some ( ( pattern ) => {
1298
+ try {
1299
+ const glob = new Glob ( pattern )
1300
+ return glob . match ( filePath )
1301
+ }
1302
+ catch ( error ) {
1303
+ this . logger . warn ( `Invalid glob pattern '${ pattern } ':` , error )
1304
+ return false
1305
+ }
1306
+ } )
1307
+ } )
1308
+
1309
+ // If any removed files are outside ignored paths, don't auto-close
1310
+ if ( filesOutsideIgnoredPaths . length > 0 ) {
1311
+ this . logger . info ( `Some removed files are outside ignored paths - not auto-closing PR #${ existingPR . number } ` )
1312
+ return false
1313
+ }
1314
+ }
1315
+
1292
1316
// Special handling for composer files - if composer.json is removed, close all composer-related PRs
1293
1317
const hasRemovedComposerJson = removedFiles . some ( file => file . endsWith ( 'composer.json' ) )
1294
1318
if ( hasRemovedComposerJson ) {
You can’t perform that action at this time.
0 commit comments