Skip to content

Commit f2af61e

Browse files
committed
Add reusable workflow to trigger CodeRabbit review on bot PRs
CodeRabbit has implicit default behavior that automatically skips bot PRs. The recommended solution is to add a workflow that adds a PR comment to trigger review. This commit adds a reusable workflow that centralizes the logic and can be called from a small workflow in each repository. Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
1 parent ddcbec0 commit f2af61e

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
name: Trigger CodeRabbit (Reusable)
3+
on:
4+
workflow_call:
5+
6+
jobs:
7+
trigger-coderabbit:
8+
runs-on: ubuntu-latest
9+
if: github.actor == 'dependabot[bot]' || github.actor == 'submariner-bot'
10+
permissions:
11+
pull-requests: write
12+
steps:
13+
- uses: actions/github-script@v8
14+
with:
15+
script: |
16+
github.rest.issues.createComment({
17+
issue_number: context.issue.number,
18+
owner: context.repo.owner,
19+
repo: context.repo.repo,
20+
body: '@coderabbitai review'
21+
})

0 commit comments

Comments
 (0)