Skip to content

feat: support Cubic feedback workflow for external forked PRs#26910

Merged
keithwillcode merged 2 commits intomainfrom
devin/1768517691-cubic-forked-pr-support
Feb 3, 2026
Merged

feat: support Cubic feedback workflow for external forked PRs#26910
keithwillcode merged 2 commits intomainfrom
devin/1768517691-cubic-forked-pr-support

Conversation

@keithwillcode
Copy link
Copy Markdown
Contributor

What does this PR do?

Updates the "Cubic feedback addressed by Devin" workflow to run for external forked PRs by using the workflow_run pattern.

The pull_request_review event doesn't have access to secrets when triggered from forks (GitHub security feature). This PR splits the workflow into two parts:

  1. cubic-devin-review-trigger.yml - Lightweight workflow that triggers on pull_request_review and saves the review context (PR number, review body) as an artifact
  2. cubic-devin-review.yml - Main workflow that triggers on workflow_run of the first workflow, downloads the artifact, and processes it with full permissions/secrets access

This follows the same pattern used by on-changes-requested.yml and re-draft.yml in this repo.

Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • I have updated the developer docs in /docs if this PR makes changes that would require a documentation change. N/A - workflow-only change
  • I confirm automated tests are in place that prove my fix is effective or that my feature works. N/A - GitHub workflow changes cannot be unit tested

How should this be tested?

This workflow change can only be fully tested in production:

  1. Have an external contributor create a PR from a fork
  2. Have Cubic AI submit a review on that PR
  3. Verify the "Cubic AI Review Trigger" workflow runs and uploads the artifact
  4. Verify the "Cubic feedback addressed by Devin" workflow triggers and creates a Devin session

Checklist

  • My code follows the style guidelines of this project
  • I have checked if my changes generate no new warnings

Human Review Checklist

  • Verify the artifact JSON structure in the trigger workflow matches what's being read in the main workflow
  • Confirm the workflow name "Cubic AI Review Trigger" matches exactly between the two files
  • Check that actions: read permission is sufficient for downloading artifacts

Link to Devin run: https://app.devin.ai/sessions/dcf40a7b8f6444db8542540e4b93b9b8
Requested by: @keithwillcode

Use workflow_run pattern to enable the Cubic AI to Devin review workflow
for PRs from external forks. The pull_request_review event doesn't have
access to secrets when triggered from forks, so we split into two workflows:

1. cubic-devin-review-trigger.yml - Lightweight workflow that triggers on
   pull_request_review and saves the review context as an artifact
2. cubic-devin-review.yml - Main workflow that triggers on workflow_run,
   downloads the artifact, and processes it with full permissions/secrets

This follows the same pattern used by on-changes-requested.yml and re-draft.yml.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration
Copy link
Copy Markdown
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR that start with 'DevinAI' or '@devin'.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@github-actions
Copy link
Copy Markdown
Contributor

This PR has been marked as stale due to inactivity. If you're still working on it or need any help, please let us know or update the PR to keep it active.

@github-actions github-actions Bot added the Stale label Jan 23, 2026
@keithwillcode keithwillcode added the core area: core, team members only label Feb 3, 2026
@keithwillcode keithwillcode marked this pull request as ready for review February 3, 2026 14:29
@keithwillcode keithwillcode requested a review from a team as a code owner February 3, 2026 14:29
@keithwillcode keithwillcode added this to the v6.2 milestone Feb 3, 2026
@keithwillcode keithwillcode enabled auto-merge (squash) February 3, 2026 14:29
- name: Upload review context
uses: actions/upload-artifact@v4
with:
name: cubic-review-context
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DevinAI do we need to add something specific to the name here to avoid collisions across multiple reviews happening across various PRs?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're correct - it will be fine as-is. The artifact is scoped to the specific workflow run ID. When the main workflow downloads the artifact, it uses context.payload.workflow_run.id to fetch artifacts from only that specific trigger run:

const artifacts = await github.rest.actions.listWorkflowRunArtifacts({
  run_id: context.payload.workflow_run.id,  // Specific to this trigger run
});

Even if multiple Cubic reviews happen simultaneously on different PRs, each trigger workflow has its own unique run ID, so there's no collision risk. This is the same pattern used by on-changes-requested.yml which also uses a static artifact name (context.json) without any PR-specific suffix.

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

@keithwillcode
Copy link
Copy Markdown
Contributor Author

@pumfleet Force merging because the atoms build failing is unrelated and being urgently looked into by engineering to unblock CI.

auto-merge was automatically disabled February 3, 2026 14:40

Pull request was closed

@keithwillcode keithwillcode reopened this Feb 3, 2026
@keithwillcode keithwillcode merged commit c9b4143 into main Feb 3, 2026
68 of 70 checks passed
@keithwillcode keithwillcode deleted the devin/1768517691-cubic-forked-pr-support branch February 3, 2026 14:41
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 3, 2026

E2E results are ready!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants