mirror of
https://github.com/bmad-code-org/BMAD-METHOD.git
synced 2026-09-01 15:09:07 +08:00
cb73c05cf6
The workflow was failing with 403 "Resource not accessible by integration" on fork PRs because pull_request events get read-only GITHUB_TOKEN permissions for cross-repository PRs. Switching to pull_request_target runs the workflow in the base repo context, granting write permissions needed to post the @coderabbitai review comment. This is safe because the workflow only posts a comment and does not check out or execute any code from the PR branch. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
23 lines
580 B
YAML
23 lines
580 B
YAML
name: Trigger CodeRabbit on Ready for Review
|
|
|
|
on:
|
|
pull_request_target:
|
|
types: [ready_for_review]
|
|
|
|
jobs:
|
|
trigger-review:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
pull-requests: write
|
|
steps:
|
|
- name: Request CodeRabbit review
|
|
uses: actions/github-script@v7
|
|
with:
|
|
script: |
|
|
await github.rest.issues.createComment({
|
|
owner: context.repo.owner,
|
|
repo: context.repo.repo,
|
|
issue_number: context.payload.pull_request.number,
|
|
body: '@coderabbitai review'
|
|
});
|