From 63991f87df53bf4cac19d46e2aa2eb6388e0f760 Mon Sep 17 00:00:00 2001 From: wenshao Date: Fri, 17 Apr 2026 07:16:02 +0800 Subject: [PATCH 1/5] 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. --- .github/workflows/stale.yml | 36 +++++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 87354b5706f..96a6df8efa8 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -10,7 +10,7 @@ jobs: stale: runs-on: 'ubuntu-latest' if: |- - ${{ github.repository == 'google-gemini/gemini-cli' }} + ${{ github.repository == 'QwenLM/qwen-code' }} permissions: issues: 'write' pull-requests: 'write' @@ -21,19 +21,25 @@ jobs: - 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. + # Issues are intentionally disabled here; a separate policy will + # be introduced once issue triage labels are in place. + days-before-issue-stale: -1 + days-before-issue-close: -1 + # Pull requests: 4 weeks to stale + 4 weeks to close. + days-before-pr-stale: 28 + days-before-pr-close: 28 + stale-pr-label: 'status/stale' 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! + This pull request has had no activity for 4 weeks and is being marked as stale. + It will be closed in another 4 weeks if no further activity occurs. + To keep it open, push a new commit or leave a comment. + Maintainers may apply `pinned`, `status/blocked`, `status/on-hold`, + or `status/ready-for-merge` to exempt it from auto-close. 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-issue-labels: 'pinned,security' - exempt-pr-labels: 'pinned,security' + This pull request has been closed after 4 additional weeks of inactivity. + You are welcome to reopen it or submit a new pull request if the change is still relevant. + Thanks for contributing! + exempt-pr-labels: 'pinned,security,status/blocked,status/on-hold,status/ready-for-merge' + remove-stale-when-updated: true + ascending: true + operations-per-run: 100 From 7fa75764f896a0aca1a9d81e7c2065159ac6303f Mon Sep 17 00:00:00 2001 From: wenshao Date: Fri, 17 Apr 2026 07:22:10 +0800 Subject: [PATCH 2/5] 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. --- .github/workflows/stale.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 96a6df8efa8..96d68cf5f1d 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -25,18 +25,18 @@ jobs: # be introduced once issue triage labels are in place. days-before-issue-stale: -1 days-before-issue-close: -1 - # Pull requests: 4 weeks to stale + 4 weeks to close. - days-before-pr-stale: 28 - days-before-pr-close: 28 + # Pull requests: 5 weeks to stale + 5 weeks to close. + days-before-pr-stale: 35 + days-before-pr-close: 35 stale-pr-label: 'status/stale' stale-pr-message: >- - This pull request has had no activity for 4 weeks and is being marked as stale. - It will be closed in another 4 weeks if no further activity occurs. + This pull request has had no activity for 5 weeks and is being marked as stale. + It will be closed in another 5 weeks if no further activity occurs. To keep it open, push a new commit or leave a comment. Maintainers may apply `pinned`, `status/blocked`, `status/on-hold`, or `status/ready-for-merge` to exempt it from auto-close. close-pr-message: >- - This pull request has been closed after 4 additional weeks of inactivity. + This pull request has been closed after 5 additional weeks of inactivity. You are welcome to reopen it or submit a new pull request if the change is still relevant. Thanks for contributing! exempt-pr-labels: 'pinned,security,status/blocked,status/on-hold,status/ready-for-merge' From 720a7e49d4a6122d62ccd12c847bc016b1ab9d34 Mon Sep 17 00:00:00 2001 From: wenshao Date: Fri, 17 Apr 2026 07:40:15 +0800 Subject: [PATCH 3/5] 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. --- .github/workflows/stale.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 96d68cf5f1d..93a67c865a3 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -1,9 +1,11 @@ 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: schedule: - - cron: '30 1 * * *' + - cron: '30 0 * * *' workflow_dispatch: jobs: From c45d47fd7686915cc5be8c2201fa0b69d793b5f3 Mon Sep 17 00:00:00 2001 From: wenshao Date: Fri, 17 Apr 2026 11:58:40 +0800 Subject: [PATCH 4/5] 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). --- .github/workflows/stale.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 93a67c865a3..ab051f780b5 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -11,8 +11,6 @@ on: jobs: stale: runs-on: 'ubuntu-latest' - if: |- - ${{ github.repository == 'QwenLM/qwen-code' }} permissions: issues: 'write' pull-requests: 'write' @@ -44,4 +42,6 @@ jobs: exempt-pr-labels: 'pinned,security,status/blocked,status/on-hold,status/ready-for-merge' remove-stale-when-updated: true 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 From 269a08206beb3b8781580fb5f2a82d0a298f0cf5 Mon Sep 17 00:00:00 2001 From: wenshao Date: Sat, 18 Apr 2026 14:17:18 +0800 Subject: [PATCH 5/5] ci(stale): shift PR cadence from 35+35 to 60+30 Give authors a longer idle window before the stale warning (60 days) while shortening the grace period after the warning (30 days). Total time-to-close is unchanged at 90 days, but the louder signal now lands closer to the actual closure so authors are less likely to be caught off guard by a silent auto-close. --- .github/workflows/stale.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index ab051f780b5..152c97e599c 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -25,18 +25,18 @@ jobs: # be introduced once issue triage labels are in place. days-before-issue-stale: -1 days-before-issue-close: -1 - # Pull requests: 5 weeks to stale + 5 weeks to close. - days-before-pr-stale: 35 - days-before-pr-close: 35 + # 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: >- - This pull request has had no activity for 5 weeks and is being marked as stale. - It will be closed in another 5 weeks if no further activity occurs. + This pull request has had no activity for 60 days and is being marked as stale. + It will be closed in another 30 days if no further activity occurs. To keep it open, push a new commit or leave a comment. Maintainers may apply `pinned`, `status/blocked`, `status/on-hold`, or `status/ready-for-merge` to exempt it from auto-close. close-pr-message: >- - This pull request has been closed after 5 additional weeks of inactivity. + This pull request has been closed after 30 additional days of inactivity. You are welcome to reopen it or submit a new pull request if the change is still relevant. Thanks for contributing! exempt-pr-labels: 'pinned,security,status/blocked,status/on-hold,status/ready-for-merge'