Files
gemini-cli/.github/workflows/stale.yml
T
gemini-cli[bot] e9efec3a5b # PR: Fix Lint, Stale Logic & Policy Conflict
This PR addresses critical technical and logical flaws identified in the previous bot run.

### Changes:
- **Fixed Lint Failures**: Resolved unused variable errors in `tools/gemini-cli-bot/metrics/scripts/backlog_age.ts`.
- **Robust Stale Logic**: Refactored `.github/workflows/gemini-scheduled-stale-issue-closer.yml` to:
    - Implement a proper **2-phase logic** (Nudge then Close).
    - Add **automatic 'stale' label removal** when human activity is detected.
    - Implement **robust human activity detection** checking comments, issue events (e.g. description updates), and creation date.
    - Added a **180-day threshold** for `help wanted` issues to reduce backlog bloat while respecting community-friendly labels.
- **Consolidated Stale Policy**: Disabled issue processing in `.github/workflows/stale.yml` and increased its throughput for PRs to 300 operations per run. Centralizing issue management in the custom scheduled closer eliminates contradictory behaviors and policy fragmentation.

### Expected Impact:
- **Backlog Reduction**: Safely targets a massive issue backlog (2300+) by allowing `help wanted` issues to eventually go stale after 6 months of inactivity.
- **Improved Accuracy**: Prevents incorrect closures by accurately detecting human engagement even without comments.
- **Maintainer Confidence**: Ensures issues are only closed after a mandatory nudge period and that engagement is properly rewarded by resetting the stale state.
2026-05-01 04:09:13 +00:00

47 lines
1.9 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:
strategy:
fail-fast: false
matrix:
runner:
- 'ubuntu-latest' # GitHub-hosted
runs-on: '${{ matrix.runner }}'
if: |-
${{ github.repository == 'google-gemini/gemini-cli' }}
permissions:
issues: 'write'
pull-requests: 'write'
concurrency:
group: '${{ github.workflow }}-stale'
cancel-in-progress: true
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.
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-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!
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-issue-stale: -1
days-before-pr-stale: 60
days-before-close: 14
operations-per-run: 300
exempt-issue-labels: 'pinned,security,🔒 maintainer only,help wanted,🗓️ Public Roadmap'
exempt-pr-labels: 'pinned,security,🔒 maintainer only,help wanted,🗓️ Public Roadmap'