Skip to content

Commit 8e5cc6d

Browse files
authored
ci: add AI-powered PR code review via SAM PR Reviewer (#8919)
* ci: add SAM PR Reviewer for AI code reviews * ci: add SAM PR Reviewer to build.yml
1 parent f0678ad commit 8e5cc6d

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: AI Code Review
2+
3+
on:
4+
pull_request_target:
5+
types: [opened, synchronize, reopened]
6+
7+
permissions:
8+
contents: read
9+
pull-requests: write
10+
11+
jobs:
12+
review:
13+
runs-on: ubuntu-latest
14+
steps:
15+
# Checkout base branch (trusted) — workspace files are never from the fork
16+
- uses: actions/checkout@v6
17+
with:
18+
fetch-depth: 0
19+
20+
# Fetch PR head commit so git diff works, but don't checkout fork files
21+
- name: Fetch PR head
22+
run: git fetch origin "$PR_HEAD_SHA"
23+
env:
24+
PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
25+
26+
- uses: roger-zhangg/sam-pr-reviewer@793976165e969a6ccb6ace13d35811c02471f471 # v1
27+
with:
28+
github_token: ${{ secrets.GITHUB_TOKEN }}
29+
kiro_api_key: ${{ secrets.KIRO_API_KEY }}

0 commit comments

Comments
 (0)