From 2f46a475f2b1a4bd62619daf083fcc528ccb4e4e Mon Sep 17 00:00:00 2001 From: Nizar Alrifai Date: Tue, 31 Mar 2026 17:44:52 -0700 Subject: [PATCH] fix: create prompt file when both automatic review flags are set When both automatic_review and automatic_security_review were true, prepareTagExecution returned early without calling prepareReviewMode, so no prompt file was written. The Droid Exec step then failed with 'Prompt file does not exist'. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com> --- src/tag/index.ts | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/src/tag/index.ts b/src/tag/index.ts index f17e07d..b0e2c30 100644 --- a/src/tag/index.ts +++ b/src/tag/index.ts @@ -103,13 +103,11 @@ export async function prepareTagExecution({ ); const commentId = commentData.id; - // Handle parallel review mode when both flags are set + // Handle when both automatic review flags are set if ( context.inputs.automaticReview && context.inputs.automaticSecurityReview ) { - // Output flags for parallel workflow jobs - const runCodeReview = true; let runSecurityReview = true; // Check if security review already exists on this PR (run once behavior) @@ -121,19 +119,16 @@ export async function prepareTagExecution({ runSecurityReview = false; } - // Set outputs for downstream jobs - core.setOutput("run_code_review", runCodeReview.toString()); + core.setOutput("run_code_review", "true"); core.setOutput("run_security_review", runSecurityReview.toString()); - // For parallel mode, return early - individual jobs will run their own reviews - return { - skipped: false, - branchInfo: { - baseBranch: "", - currentBranch: "", - }, - mcpTools: "", - }; + // Prepare the code review (creates prompt file needed by the Droid Exec step) + return prepareReviewMode({ + context, + octokit, + githubToken, + trackingCommentId: commentId, + }); } if (context.inputs.automaticReview) {