Skip to content

Commit fee3c43

Browse files
committed
fix: Update presubmit action
1 parent 1bfdf21 commit fee3c43

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

.github/workflows/presubmit.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ permissions:
66
issues: write
77

88
on:
9-
pull_request:
10-
pull_request_review_comment:
9+
pull_request_target: # Handle forked repository PRs in the base repository context
10+
types: [opened, synchronize]
11+
pull_request_review_comment: # Handle review comments
1112
types: [created]
1213

1314
jobs:
@@ -20,7 +21,14 @@ jobs:
2021
echo "Error: LLM_API_KEY secret is not configured"
2122
exit 1
2223
fi
23-
- uses: presubmit/ai-reviewer@latest
24+
25+
- name: Check out PR code
26+
uses: actions/checkout@v3
27+
with:
28+
ref: ${{ github.event.pull_request.head.sha }}
29+
30+
- name: Run AI Reviewer
31+
uses: presubmit/ai-reviewer@latest
2432
env:
2533
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2634
LLM_API_KEY: ${{ secrets.LLM_API_KEY }}

0 commit comments

Comments
 (0)