Files
gemini-cli/.github/workflows/gemini-cli-bot-pulse.yml
T
gemini-cli[bot] 923a692acb 🤖 Implement Gemini PR Pre-review Reflex
This PR adds a new reflex action to the Gemini CLI Bot that automatically provides high-level pre-reviews for new pull requests.

### Changes:
- Created `tools/gemini-cli-bot/reflexes/scripts/pr_pre_review.ts`: A reflex script that uses Gemini to evaluate PRs based on quality, roadmap alignment, "obvious wins," and repository best practices.
- Updated `.github/workflows/gemini-cli-bot-pulse.yml`: Added `GEMINI_API_KEY` and ensure the Gemini CLI is bundled before running reflex actions.

### Impact:
- **Time to First Response**: Will decrease as the bot provides initial feedback within 30 minutes of PR submission.
- **Maintainer Productivity**: High-level assessments and roadmap alignment checks will help maintainers prioritize reviews.
- **Contributor Experience**: Immediate feedback on best practices and roadmap alignment.

This addresses the request in issue #26471.
2026-05-04 22:28:40 +00:00

54 lines
1.5 KiB
YAML

name: '🔄 Gemini CLI Bot: Pulse'
on:
schedule:
- cron: '*/30 * * * *' # Every 30 minutes
workflow_dispatch:
concurrency:
group: '${{ github.workflow }}-${{ github.ref }}'
cancel-in-progress: true
permissions:
contents: 'write'
issues: 'write'
pull-requests: 'write'
jobs:
pulse:
name: 'Pulse (Reflex Layer)'
runs-on: 'ubuntu-latest'
if: "github.repository == 'google-gemini/gemini-cli'"
steps:
- name: 'Checkout'
uses: 'actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8' # ratchet:actions/checkout@v5
with:
fetch-depth: 0
- name: 'Setup Node.js'
uses: 'actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020' # ratchet:actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: 'Install dependencies'
run: 'npm ci'
- name: 'Build Gemini CLI'
run: 'npm run bundle'
- name: 'Run Reflex Processes'
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
GEMINI_API_KEY: '${{ secrets.GEMINI_API_KEY }}'
GEMINI_MODEL: 'gemini-3-flash-preview'
run: |
if [ -d "tools/gemini-cli-bot/reflexes/scripts" ] && [ "$(ls -A tools/gemini-cli-bot/reflexes/scripts)" ]; then
for script in tools/gemini-cli-bot/reflexes/scripts/*.ts; do
echo "Running reflex script: $script"
npx tsx "$script"
done
else
echo "No reflex scripts found."
fi