From 19c0428419deeb5e94cf5cbde48a30180511f32e Mon Sep 17 00:00:00 2001 From: LordSchmackes Date: Thu, 21 May 2026 15:24:58 +0200 Subject: [PATCH 1/7] ci: add gemini ai pr review action --- .github/workflows/gemini-pr-review.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/gemini-pr-review.yml diff --git a/.github/workflows/gemini-pr-review.yml b/.github/workflows/gemini-pr-review.yml new file mode 100644 index 0000000..6ba0192 --- /dev/null +++ b/.github/workflows/gemini-pr-review.yml @@ -0,0 +1,25 @@ +name: "Gemini AI PR Review" + +on: + pull_request: + types: [opened, synchronize, reopened] + +permissions: + pull-requests: write + contents: read + +jobs: + review: + name: "Code Review" + runs-on: ubuntu-latest + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Gemini AI Review + uses: petarzarkov/gemini-code-review-action@v1.4.1 # Using a stable version tag + with: + gemini_api_key: ${{ secrets.GEMINI_API_KEY }} + github_token: ${{ secrets.GITHUB_TOKEN }} + # You can add custom prompt instructions here if needed: + # prompt: "You are a senior software engineer. Review this PR..." -- 2.54.0 From 05210c06488c0cfb0d77f8e51297af1cb20821b0 Mon Sep 17 00:00:00 2001 From: LordSchmackes Date: Thu, 21 May 2026 15:27:04 +0200 Subject: [PATCH 2/7] fix: update gemini action version to latest --- .github/workflows/gemini-pr-review.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/gemini-pr-review.yml b/.github/workflows/gemini-pr-review.yml index 6ba0192..12bbef5 100644 --- a/.github/workflows/gemini-pr-review.yml +++ b/.github/workflows/gemini-pr-review.yml @@ -17,7 +17,7 @@ jobs: uses: actions/checkout@v4 - name: Gemini AI Review - uses: petarzarkov/gemini-code-review-action@v1.4.1 # Using a stable version tag + uses: petarzarkov/gemini-code-review-action@latest # Using latest version tag with: gemini_api_key: ${{ secrets.GEMINI_API_KEY }} github_token: ${{ secrets.GITHUB_TOKEN }} -- 2.54.0 From 5d8832adf852186a38e0c18eb6c9839675d108d1 Mon Sep 17 00:00:00 2001 From: LordSchmackes Date: Thu, 21 May 2026 15:32:43 +0200 Subject: [PATCH 3/7] fix: change inputs to env vars and secure API key --- .github/workflows/gemini-pr-review.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/gemini-pr-review.yml b/.github/workflows/gemini-pr-review.yml index 12bbef5..f07002d 100644 --- a/.github/workflows/gemini-pr-review.yml +++ b/.github/workflows/gemini-pr-review.yml @@ -18,8 +18,8 @@ jobs: - name: Gemini AI Review uses: petarzarkov/gemini-code-review-action@latest # Using latest version tag - with: - gemini_api_key: ${{ secrets.GEMINI_API_KEY }} - github_token: ${{ secrets.GITHUB_TOKEN }} + env: + GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # You can add custom prompt instructions here if needed: # prompt: "You are a senior software engineer. Review this PR..." -- 2.54.0 From 9b9fbcf6f06e319cf5a443dfb0c8a197987a3dab Mon Sep 17 00:00:00 2001 From: LordSchmackes Date: Thu, 21 May 2026 15:36:22 +0200 Subject: [PATCH 4/7] fix: switch to gemini-1.5-flash to avoid quota errors --- .github/workflows/gemini-pr-review.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/gemini-pr-review.yml b/.github/workflows/gemini-pr-review.yml index f07002d..b88fb9e 100644 --- a/.github/workflows/gemini-pr-review.yml +++ b/.github/workflows/gemini-pr-review.yml @@ -21,5 +21,7 @@ jobs: env: GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + model: gemini-1.5-flash # You can add custom prompt instructions here if needed: # prompt: "You are a senior software engineer. Review this PR..." -- 2.54.0 From 28098658acad919f18d8885515c968524d109155 Mon Sep 17 00:00:00 2001 From: LordSchmackes Date: Thu, 21 May 2026 15:37:37 +0200 Subject: [PATCH 5/7] fix: use gemini-2.0-flash-lite model --- .github/workflows/gemini-pr-review.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/gemini-pr-review.yml b/.github/workflows/gemini-pr-review.yml index b88fb9e..ed44bc5 100644 --- a/.github/workflows/gemini-pr-review.yml +++ b/.github/workflows/gemini-pr-review.yml @@ -22,6 +22,6 @@ jobs: GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - model: gemini-1.5-flash + model: gemini-2.0-flash-lite # You can add custom prompt instructions here if needed: # prompt: "You are a senior software engineer. Review this PR..." -- 2.54.0 From 50174924611ee5030c68bb104c2c5aa343bbca23 Mon Sep 17 00:00:00 2001 From: LordSchmackes Date: Thu, 21 May 2026 15:42:37 +0200 Subject: [PATCH 6/7] fix: update model to gemini-1.5-flash-latest for v1beta api compatibility --- .github/workflows/gemini-pr-review.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/gemini-pr-review.yml b/.github/workflows/gemini-pr-review.yml index ed44bc5..b671ba2 100644 --- a/.github/workflows/gemini-pr-review.yml +++ b/.github/workflows/gemini-pr-review.yml @@ -22,6 +22,6 @@ jobs: GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - model: gemini-2.0-flash-lite + model: gemini-1.5-flash-latest # You can add custom prompt instructions here if needed: # prompt: "You are a senior software engineer. Review this PR..." -- 2.54.0 From 7f52e73b0a55e0206a15c60a6bb15dd1e67b9a23 Mon Sep 17 00:00:00 2001 From: LordSchmackes Date: Thu, 21 May 2026 15:43:23 +0200 Subject: [PATCH 7/7] chore: pin gemini code review action to v1.0.4 --- .github/workflows/gemini-pr-review.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/gemini-pr-review.yml b/.github/workflows/gemini-pr-review.yml index b671ba2..c7e24e4 100644 --- a/.github/workflows/gemini-pr-review.yml +++ b/.github/workflows/gemini-pr-review.yml @@ -17,7 +17,7 @@ jobs: uses: actions/checkout@v4 - name: Gemini AI Review - uses: petarzarkov/gemini-code-review-action@latest # Using latest version tag + uses: petarzarkov/gemini-code-review-action@v1.0.4 # Pinned version for stability env: GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} -- 2.54.0