mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-06-15 05:47:18 -07:00
3eab0513cd
## Overview
This PR addresses a significant growth in the repository's open issues (2342) and PRs (440) by optimizing the automated stale policy and adding visibility into backlog health.
## Changes
1. **New Metrics**:
- `backlog_health.ts`: Tracks the median age (in days) of the 100 oldest open PRs and issues. This provides a "worst-case" signal for backlog stagnation.
- `stale_ratio.ts`: Tracks the percentage of open items currently labeled as `stale`.
2. **Stale Policy Optimization**:
- Increased `operations-per-run` in `.github/workflows/stale.yml` from default (~30) to 500 total (300 for issues, 200 for PRs).
- Split the stale job into two parallel jobs (`stale-issues` and `stale-prs`) to increase daily throughput and prevent issues from blocking PR processing.
## Rationale
Metrics analysis showed that while the repository has excellent "Fast Path" performance (PRs merged in ~23 hours), it has a massive "Slow Path" backlog that is likely not being touched by automation due to default throttling in `actions/stale`. By increasing the processing limit, we can accelerate the cleanup of stale items and help maintainers focus on active work.
## Impact
- **Productivity**: Reduces "noise" in the issue tracker and PR list.
- **Observability**: New metrics will allow the "Bot Brain" to monitor the effectiveness of these policy changes over time.
- **Latency**: Expected to decrease the median age of open items as stale ones are closed.
51 lines
2.2 KiB
YAML
51 lines
2.2 KiB
YAML
name: 'Mark stale issues and pull requests'
|
|
|
|
# Run as a daily cron at 1:30 AM
|
|
on:
|
|
schedule:
|
|
- cron: '30 1 * * *'
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
stale-issues:
|
|
runs-on: ubuntu-latest
|
|
if: github.repository == 'google-gemini/gemini-cli'
|
|
permissions:
|
|
issues: write
|
|
steps:
|
|
- uses: actions/stale@5bef64f19d7facfb25b37b414482c7164d639639 # ratchet:actions/stale@v9
|
|
with:
|
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
|
stale-issue-message: >-
|
|
This issue has been automatically marked as stale due to 60 days of inactivity.
|
|
It will be closed in 14 days if no further activity occurs.
|
|
close-issue-message: >-
|
|
This issue has been closed due to 14 additional days of inactivity after being marked as stale.
|
|
If you believe this is still relevant, feel free to comment or reopen the issue. Thank you!
|
|
days-before-stale: 60
|
|
days-before-close: 14
|
|
exempt-issue-labels: 'pinned,security,🔒 maintainer only,help wanted,🗓️ Public Roadmap,needs-triage,waiting-on-maintainer,status: blocked'
|
|
operations-per-run: 300
|
|
only-issues: true
|
|
|
|
stale-prs:
|
|
runs-on: ubuntu-latest
|
|
if: github.repository == 'google-gemini/gemini-cli'
|
|
permissions:
|
|
pull-requests: write
|
|
steps:
|
|
- uses: actions/stale@5bef64f19d7facfb25b37b414482c7164d639639 # ratchet:actions/stale@v9
|
|
with:
|
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
|
stale-pr-message: >-
|
|
This pull request has been automatically marked as stale due to 60 days of inactivity.
|
|
It will be closed in 14 days if no further activity occurs.
|
|
close-pr-message: >-
|
|
This pull request has been closed due to 14 additional days of inactivity after being marked as stale.
|
|
If this is still relevant, you are welcome to reopen or leave a comment. Thanks for contributing!
|
|
days-before-stale: 60
|
|
days-before-close: 14
|
|
exempt-pr-labels: 'pinned,security,🔒 maintainer only,help wanted,🗓️ Public Roadmap,needs-triage,waiting-on-maintainer,status: blocked'
|
|
operations-per-run: 200
|
|
only-prs: true
|