Skip to content

Commit 28108e1

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 28108e1

File tree

1 file changed

+20
-0
lines changed

1 file changed

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

0 commit comments

Comments
 (0)