Skip to content

Commit dee9018

Browse files
committed
Add more debug
1 parent 3906edf commit dee9018

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

src/commands/fix/npm-fix.mts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,14 @@ export async function npmFix(
236236
activeBranches.push(parsedBranch)
237237
}
238238
}
239+
if (activeBranches.length) {
240+
debugFn(
241+
`found: ${activeBranches.length} active branches\n`,
242+
activeBranches,
243+
)
244+
} else if (openPrs.length) {
245+
debugFn('miss: 0 active branches found')
246+
}
239247
infos = infos.filter(
240248
info =>
241249
!activeBranches.find(

src/commands/fix/pnpm-fix.mts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,9 @@ export async function pnpmFix(
306306
const activeBranches: SocketBranchParseResult[] = []
307307
for (const pr of openPrs) {
308308
const parsedBranch = branchParser!(pr.headRefName)
309+
debugFn(`parse: ${pr.headRefName}\n`, parsedBranch)
310+
debugFn(`check: branchPurlType ${branchPurlType} === ${parsedBranch?.type}`)
311+
debugFn(`check: branchFullName ${branchFullName} === ${parsedBranch?.fullName}`)
309312
if (
310313
branchPurlType === parsedBranch?.type &&
311314
branchFullName === parsedBranch?.fullName
@@ -318,7 +321,7 @@ export async function pnpmFix(
318321
`found: ${activeBranches.length} active branches\n`,
319322
activeBranches,
320323
)
321-
} else {
324+
} else if (openPrs.length) {
322325
debugFn('miss: 0 active branches found')
323326
}
324327
infos = infos.filter(

0 commit comments

Comments
 (0)