ci: trigger CodeRabbit review on PR un-draft (#1558)

CodeRabbit doesn't reliably handle the ready_for_review webhook
event, so draft PRs that are marked ready never get auto-reviewed.
This workflow posts @coderabbitai review when a PR transitions
from draft to ready, working around the limitation.
This commit is contained in:
Alex Verkhovsky 2026-02-06 06:31:58 -07:00 committed by GitHub
parent ae92f7bc50
commit d027811954
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 22 additions and 0 deletions

View File

@ -0,0 +1,22 @@
name: Trigger CodeRabbit on Ready for Review
on:
pull_request:
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'
});