Skip to content

Commit 418c1e2

Browse files
fix(workflow): check PR URL existence instead of branch for hasExistingPr
prepareImplementationBranch sets state.pullRequest with branch info before the PR is actually created on GitHub. This caused the workflow to always take the 'update PR' path instead of 'create PR' on the first implementation pass. Now checks state.pullRequest?.url instead.
1 parent e4012b9 commit 418c1e2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/core/workflow.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -646,7 +646,7 @@ async function handleImplementingStage(
646646
}
647647
}
648648

649-
const hasExistingPr = Boolean(state.pullRequest);
649+
const hasExistingPr = Boolean(state.pullRequest?.url);
650650
const fixRound = hasExistingPr && state.bugs.length > 0;
651651
const prompt = fixRound
652652
? await buildFixPrompt(

0 commit comments

Comments
 (0)