mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-06-07 01:22:48 -07:00
4e2f74b8a4
This PR implements high-impact changes to reduce GitHub Actions spend and improve issue backlog management. #### 📉 Actions Spend Reductions - **Mac Runner Downgrade**: Switched `test_mac` and `e2e_mac` jobs from `macos-latest-large` to standard `macos-latest`. Mac Large runners are significantly more expensive (~40x Linux) and were the primary driver of the recent 10x spend spike. - **Mac Matrix Optimization**: Reduced the `test_mac` matrix to only Node 20.x. Testing 3 Node versions on Mac for every PR was redundant, as OS-specific issues are typically caught by the LTS version, while cross-version logic is verified on the much cheaper Linux runners. - **Pulse Workflow Optimization**: Added a `precheck` job to the Pulse workflow to skip the expensive `npm ci` and setup steps if no reflex scripts are present. #### 📋 Backlog Management - **Accelerated Stale Lifecycle**: Reduced `STALE_DAYS` from 60 to 30. This ensures that inactive issues are identified and processed faster, helping to manage the current volume of 2148 open issues. - **Increased Triage Throughput**: Increased the batch limit for scheduled issue triage from 100 to 200, allowing the bot to process a larger portion of the untriaged backlog in each run. #### 📊 Expected Impact - **Cost**: Significant reduction in monthly Actions spend by eliminating redundant Mac Large runner minutes. - **Throughput**: Faster closure of stale issues and double the triage capacity per hour. --- *This PR was generated by the Gemini CLI Bot (Brain Layer) based on time-series metric analysis.*
66 lines
1.9 KiB
YAML
66 lines
1.9 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:
|
|
precheck:
|
|
name: 'Pre-check'
|
|
runs-on: 'ubuntu-latest'
|
|
if: "github.repository == 'google-gemini/gemini-cli'"
|
|
outputs:
|
|
has_scripts: '${{ steps.check.outputs.has_scripts }}'
|
|
steps:
|
|
- name: 'Checkout'
|
|
uses: 'actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8' # ratchet:actions/checkout@v5
|
|
with:
|
|
fetch-depth: 1 # Shallow checkout for check
|
|
- id: 'check'
|
|
run: |
|
|
if [ -d "tools/gemini-cli-bot/reflexes/scripts" ] && [ "$(ls -A tools/gemini-cli-bot/reflexes/scripts/*.ts 2>/dev/null)" ]; then
|
|
echo "has_scripts=true" >> "$GITHUB_OUTPUT"
|
|
else
|
|
echo "has_scripts=false" >> "$GITHUB_OUTPUT"
|
|
fi
|
|
|
|
pulse:
|
|
name: 'Pulse (Reflex Layer)'
|
|
needs: 'precheck'
|
|
if: "needs.precheck.outputs.has_scripts == 'true'"
|
|
runs-on: 'ubuntu-latest'
|
|
steps:
|
|
- name: 'Checkout'
|
|
uses: 'actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8' # ratchet:actions/checkout@v5
|
|
with:
|
|
fetch-depth: 1 # Pulse doesn't need full history unless a script specifically asks for it.
|
|
|
|
- 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: 'Run Reflex Processes'
|
|
env:
|
|
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
|
|
run: |
|
|
shopt -s nullglob
|
|
for script in tools/gemini-cli-bot/reflexes/scripts/*.ts; do
|
|
echo "Running reflex script: $script"
|
|
npx tsx "$script"
|
|
done
|