From 2231530a4ab29727e239502a62bb0e59fa734cd0 Mon Sep 17 00:00:00 2001 From: Keith Williams Date: Tue, 3 Feb 2026 12:55:22 -0300 Subject: [PATCH] fix: use step output for PR number in Cubic review workflow (#27577) The checkout step deletes the review-context.json file that was extracted from the artifact. The 'Post comment with Devin session link' step was trying to read this file after checkout, causing ENOENT errors. Fixed by using the PR number from the extract-prompt step output instead of reading the deleted file. Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- .github/workflows/cubic-devin-review.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cubic-devin-review.yml b/.github/workflows/cubic-devin-review.yml index 929f0e0fce..723c324970 100644 --- a/.github/workflows/cubic-devin-review.yml +++ b/.github/workflows/cubic-devin-review.yml @@ -192,9 +192,9 @@ jobs: ? `### Devin AI is addressing Cubic AI's review feedback\n\nA Devin session has been created to address the issues identified by Cubic AI.\n\n[View Devin Session](${sessionUrl})` : `### Devin AI is addressing Cubic AI's review feedback\n\nNew feedback has been sent to the existing Devin session.\n\n[View Devin Session](${sessionUrl})`; - const fs = require('fs'); - const contextData = JSON.parse(fs.readFileSync('review-context.json', 'utf8')); - const prNumber = contextData.pr_number; + // Use the PR number from the extract-prompt step output instead of reading the file + // (the file was deleted by the checkout step) + const prNumber = parseInt('${{ steps.extract-prompt.outputs.pr-number }}', 10); const { data: comment } = await github.rest.issues.createComment({ owner: context.repo.owner,