Skip to content

Commit 0d41510

Browse files
committed
Add more PR debug
1 parent ebdde0c commit 0d41510

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

src/commands/fix/agent-fix.mts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -479,6 +479,7 @@ export async function agentFix(
479479

480480
// Check repoInfo to make TypeScript happy.
481481
if (!errored && fixEnv.isCi && fixEnv.repoInfo) {
482+
debugFn('notice', 'pr: creating')
482483
try {
483484
if (
484485
// eslint-disable-next-line no-await-in-loop
@@ -572,6 +573,8 @@ export async function agentFix(
572573
error = e
573574
errored = true
574575
}
576+
} else if (fixEnv.isCi) {
577+
debugFn('notice', 'skip: PR creation')
575578
}
576579

577580
if (fixEnv.isCi) {

src/commands/fix/pull-request.mts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ export async function cleanupPrs(
172172
pull_number: prNum,
173173
state: 'closed',
174174
})
175-
debugFn('notice', `close: ${prRef} for ${prToVersion}`)
175+
debugFn('notice', `pr: closing ${prRef} for ${prToVersion}`)
176176
// Remove entry from parent object.
177177
context.parent.splice(context.index, 1)
178178
// Mark cache to be saved.
@@ -181,7 +181,7 @@ export async function cleanupPrs(
181181
} catch (e) {
182182
debugFn(
183183
'error',
184-
`fail: close ${prRef} for ${prToVersion}\n`,
184+
`pr: failed to close ${prRef} for ${prToVersion}\n`,
185185
(e as Error)?.message || 'unknown error',
186186
)
187187
}
@@ -196,7 +196,7 @@ export async function cleanupPrs(
196196
base: match.headRefName,
197197
head: match.baseRefName,
198198
})
199-
debugFn('notice', 'update: stale', prRef)
199+
debugFn('notice', `pr: updating stale ${prRef}`)
200200
// Update entry entry.
201201
if (context.apiType === 'graphql') {
202202
context.entry.mergeStateStatus = 'CLEAN'
@@ -207,7 +207,7 @@ export async function cleanupPrs(
207207
cachesToSave.set(context.cacheKey, context.data)
208208
} catch (e) {
209209
const message = (e as Error)?.message || 'Unknown error'
210-
debugFn('error', `fail: update ${prRef} - ${message}`)
210+
debugFn('error', `pr: failed to update ${prRef} - ${message}`)
211211
}
212212
}
213213
return match

0 commit comments

Comments
 (0)