Skip to content

Commit e63a8fd

Browse files
committed
Bring in AI feedback
1 parent 314fef6 commit e63a8fd

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: "Code Review by Gemini AI"
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
review:
8+
runs-on: ubuntu-latest
9+
permissions:
10+
contents: read
11+
pull-requests: write
12+
steps:
13+
- uses: actions/checkout@v3
14+
- name: "Get diff of the pull request"
15+
id: get_diff
16+
shell: bash
17+
env:
18+
PULL_REQUEST_HEAD_REF: "${{ github.event.pull_request.head.ref }}"
19+
PULL_REQUEST_BASE_REF: "${{ github.event.pull_request.base.ref }}"
20+
run: |-
21+
git fetch origin "${{ env.PULL_REQUEST_HEAD_REF }}"
22+
git fetch origin "${{ env.PULL_REQUEST_BASE_REF }}"
23+
git checkout "${{ env.PULL_REQUEST_HEAD_REF }}"
24+
git diff "origin/${{ env.PULL_REQUEST_BASE_REF }}" > "diff.txt"
25+
{
26+
echo "pull_request_diff<<EOF";
27+
cat "diff.txt";
28+
echo 'EOF';
29+
} >> $GITHUB_OUTPUT
30+
- uses: rubensflinco/gemini-code-review-action@1.0.5
31+
name: "Code Review by Gemini AI"
32+
id: review
33+
with:
34+
gemini_api_key: ${{ secrets.GEMINI_API_KEY }}
35+
github_token: ${{ secrets.GEMINI_GITHUB_TOKEN }}
36+
github_repository: ${{ github.repository }}
37+
github_pull_request_number: ${{ github.event.pull_request.number }}
38+
git_commit_hash: ${{ github.event.pull_request.head.sha }}
39+
model: "gemini-1.5-pro-latest"
40+
pull_request_diff: |-
41+
${{ steps.get_diff.outputs.pull_request_diff }}
42+
pull_request_chunk_size: "3500"
43+
extra_prompt: |-
44+
The code is running on an ESP32-D0WDQ6.
45+
log_level: "DEBUG"

0 commit comments

Comments
 (0)