Files
calendar/.github/workflows/cubic-devin-review-trigger.yml
T
Keith WilliamsGitHubDevin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
c9b4143f57 feat: support Cubic feedback workflow for external forked PRs (#26910)
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>
2026-02-03 11:41:06 -03:00

33 lines
1003 B
YAML

name: Cubic AI Review Trigger
on:
pull_request_review:
types: [submitted]
# This workflow triggers on pull_request_review events (including from forks)
# and saves the review context as an artifact. The main cubic-devin-review.yml
# workflow then runs via workflow_run with full permissions and secrets access.
jobs:
save-review-context:
name: Save Review Context
if: github.event.review.user.login == 'cubic-dev-ai[bot]'
runs-on: ubuntu-latest
steps:
- name: Save review context to artifact
run: |
cat > review-context.json << 'EOF'
{
"pr_number": ${{ github.event.pull_request.number }},
"review_body": ${{ toJSON(github.event.review.body) }},
"repository": "${{ github.repository }}"
}
EOF
- name: Upload review context
uses: actions/upload-artifact@v4
with:
name: cubic-review-context
path: review-context.json
retention-days: 1