Skip to content

Commit 1a74c90

Browse files
Restrict AI review to non-fork PRs only
Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent f4a46f8 commit 1a74c90

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

.github/workflows/ai-review.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: AI Review
22

33
on:
4-
pull_request:
4+
pull_request_target:
55
types: [opened, synchronize]
66

77
permissions:
@@ -11,10 +11,9 @@ permissions:
1111
jobs:
1212
review:
1313
runs-on: ubuntu-latest
14-
if: github.event.pull_request.draft == false
14+
if: github.event.pull_request.head.repo.full_name == github.repository
1515
steps:
1616
- uses: ofershap/ai-pr-reviewer@v1
1717
with:
1818
github-token: ${{ secrets.GITHUB_TOKEN }}
1919
openai-api-key: ${{ secrets.OPENAI_API_KEY }}
20-

0 commit comments

Comments
 (0)