changed gemini pr review yaml logic
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 6m1s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 4m8s
Laravel Pint / pint (pull_request) Successful in 3m1s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 47s
Laravel Larastan / larastan (pull_request) Failing after 3m46s
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 6m1s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 4m8s
Laravel Pint / pint (pull_request) Successful in 3m1s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 47s
Laravel Larastan / larastan (pull_request) Failing after 3m46s
This commit is contained in:
23
.github/workflows/gemini-pr-review.yaml
vendored
23
.github/workflows/gemini-pr-review.yaml
vendored
@@ -5,15 +5,20 @@ name: Gemini PR Review
|
|||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
types: [opened, reopened, synchronize]
|
types: [opened, reopened, synchronize]
|
||||||
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
review:
|
gemini-pr-review:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
name: Gemini PR Review
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v6
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0 # This fetches the full history
|
fetch-depth: 0 # This fetches the full history
|
||||||
|
|
||||||
@@ -22,7 +27,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
node-version: '24'
|
node-version: '24'
|
||||||
|
|
||||||
|
|
||||||
- name: Get npm cache directory
|
- name: Get npm cache directory
|
||||||
id: npm-cache-dir
|
id: npm-cache-dir
|
||||||
run: |
|
run: |
|
||||||
@@ -36,8 +40,14 @@ jobs:
|
|||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-npm-global-
|
${{ runner.os }}-npm-global-
|
||||||
|
|
||||||
- name: Install Gemini CLI globally
|
- name: Install Gemini CLI globally (if not already installed)
|
||||||
run: npm install -g --loglevel=http @google/gemini-cli
|
run: |
|
||||||
|
if ! command -v gemini &> /dev/null; then
|
||||||
|
echo "Gemini CLI not found, installing..."
|
||||||
|
npm install -g --loglevel=http @google/gemini-cli
|
||||||
|
else
|
||||||
|
echo "Gemini CLI already installed."
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Generate git diff and review with Gemini
|
- name: Generate git diff and review with Gemini
|
||||||
id: review
|
id: review
|
||||||
@@ -52,7 +62,6 @@ jobs:
|
|||||||
|
|
||||||
cat /tmp/gemini-client-error*.json || true
|
cat /tmp/gemini-client-error*.json || true
|
||||||
|
|
||||||
|
|
||||||
- name: Post output to PR comment
|
- name: Post output to PR comment
|
||||||
id: post_comment
|
id: post_comment
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
Reference in New Issue
Block a user