We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c850dc9 commit ff96a7eCopy full SHA for ff96a7e
1 file changed
.github/workflows/coderabbit-check.yml
@@ -0,0 +1,21 @@
1
+name: Require CodeRabbit Review
2
+on: [pull_request]
3
+permissions:
4
+ pull-requests: write
5
+ contents: read
6
+
7
+jobs:
8
+ check-review:
9
+ runs-on: ubuntu-latest
10
+ steps:
11
+ - name: Check for CodeRabbit Review
12
+ run: |
13
+ # Fetch PR comments and check if @coderabbitai has posted a review summary
14
+ COMMENTS=$(gh pr view $PR_NUMBER --json comments --jq '.comments[] | select(.author.login == "coderabbitai") | .body')
15
+ if [[ ! "$COMMENTS" =~ "review summary" ]]; then # Adjust regex for CodeRabbit's typical summary marker
16
+ echo "❌ CodeRabbit review required! Comment '@coderabbitai review' to trigger."
17
+ exit 1
18
+ fi
19
+ env:
20
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
21
+ PR_NUMBER: ${{ github.event.pull_request.number }}
0 commit comments