ci(stale): enable 35+35 stale/close policy for pull requests (#3375)

* ci(stale): enable 28+28 stale/close policy for pull requests

- Fix the repository guard so the workflow actually runs on
  QwenLM/qwen-code (it was previously gated to google-gemini/gemini-cli
  and never executed in this repo).
- Scope the behavior to pull requests for now; issue policy will be
  introduced separately once triage labels are in place.
- Mark a PR stale after 4 weeks without activity, then close it after
  another 4 weeks.
- Exempt pinned, security, status/blocked, status/on-hold, and
  status/ready-for-merge from auto-close.
- Remove the stale label automatically when activity resumes, and
  process the oldest PRs first on each run.

* ci(stale): loosen PR cadence from 28+28 to 35+35

Five weeks + five weeks gives contributors more slack around holidays
and busy periods, and reduces the first-run impact on the existing
backlog. The total window moves from 56 days to 70 days.

* ci(stale): move cron from 01:30 UTC to 00:30 UTC

Shift by one hour so results are ready before the Beijing work day
starts (08:30 local), while still avoiding the top of the hour (the
high-contention window for GitHub-hosted runners) and staying 30
minutes after release.yml at 00:00 UTC.

* ci(stale): drop redundant repo guard and document ops-per-run

- Remove the `github.repository == 'QwenLM/qwen-code'` job guard:
  scheduled runs are already disabled on forks by GitHub, and
  workflow_dispatch is manually-triggered so the guard adds no safety.
- Add a comment explaining the `operations-per-run: 100` rationale
  (rate-limit headroom given the ~150-PR backlog).
This commit is contained in:
Shaojin Wen 2026-04-19 09:45:17 +08:00 committed by GitHub
parent a623655c8f
commit f340d95446
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,16 +1,16 @@
name: 'Mark stale issues and pull requests' name: 'Mark stale issues and pull requests'
# Run as a daily cron at 1:30 AM # Run as a daily cron at 00:30 UTC (Beijing time 08:30).
# Avoid the top of the hour to dodge GitHub's high-contention window,
# and stay 30 minutes after release.yml (00:00 UTC) to reduce overlap.
on: on:
schedule: schedule:
- cron: '30 1 * * *' - cron: '30 0 * * *'
workflow_dispatch: workflow_dispatch:
jobs: jobs:
stale: stale:
runs-on: 'ubuntu-latest' runs-on: 'ubuntu-latest'
if: |-
${{ github.repository == 'google-gemini/gemini-cli' }}
permissions: permissions:
issues: 'write' issues: 'write'
pull-requests: 'write' pull-requests: 'write'
@ -21,19 +21,27 @@ jobs:
- uses: 'actions/stale@5bef64f19d7facfb25b37b414482c7164d639639' # ratchet:actions/stale@v9 - uses: 'actions/stale@5bef64f19d7facfb25b37b414482c7164d639639' # ratchet:actions/stale@v9
with: with:
repo-token: '${{ secrets.GITHUB_TOKEN }}' repo-token: '${{ secrets.GITHUB_TOKEN }}'
stale-issue-message: >- # Issues are intentionally disabled here; a separate policy will
This issue has been automatically marked as stale due to 60 days of inactivity. # be introduced once issue triage labels are in place.
It will be closed in 14 days if no further activity occurs. days-before-issue-stale: -1
days-before-issue-close: -1
# Pull requests: 60 days to stale + 30 days to close.
days-before-pr-stale: 60
days-before-pr-close: 30
stale-pr-label: 'status/stale'
stale-pr-message: >- stale-pr-message: >-
This pull request has been automatically marked as stale due to 60 days of inactivity. This pull request has had no activity for 60 days and is being marked as stale.
It will be closed in 14 days if no further activity occurs. It will be closed in another 30 days if no further activity occurs.
close-issue-message: >- To keep it open, push a new commit or leave a comment.
This issue has been closed due to 14 additional days of inactivity after being marked as stale. Maintainers may apply `pinned`, `status/blocked`, `status/on-hold`,
If you believe this is still relevant, feel free to comment or reopen the issue. Thank you! or `status/ready-for-merge` to exempt it from auto-close.
close-pr-message: >- close-pr-message: >-
This pull request has been closed due to 14 additional days of inactivity after being marked as stale. This pull request has been closed after 30 additional days of inactivity.
If this is still relevant, you are welcome to reopen or leave a comment. Thanks for contributing! You are welcome to reopen it or submit a new pull request if the change is still relevant.
days-before-stale: 60 Thanks for contributing!
days-before-close: 14 exempt-pr-labels: 'pinned,security,status/blocked,status/on-hold,status/ready-for-merge'
exempt-issue-labels: 'pinned,security' remove-stale-when-updated: true
exempt-pr-labels: 'pinned,security' ascending: true
# Cap per-run API operations to stay well under GitHub's hourly rate limit
# and give the current PR backlog (~150) enough headroom across a few runs.
operations-per-run: 100