From 903ee25da192379f1d7eb39f6700bf2afbb0d529 Mon Sep 17 00:00:00 2001 From: Ronit Sabhaya Date: Wed, 5 Nov 2025 09:15:32 -0600 Subject: [PATCH 1/5] ci: add stale PR and issue management workflow --- .github/workflows/stale.yml | 96 +++++++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 .github/workflows/stale.yml diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml new file mode 100644 index 00000000..96b2b40c --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,96 @@ +name: Stale PR and Issue Management + +on: + schedule: + - cron: '0 0 * * *' # Daily at midnight UTC + workflow_dispatch: # Allow manual triggering + +# Top-level permissions: least permissive (following PR #781 pattern) +permissions: + contents: read + +jobs: + stale: + name: Mark stale issues and PRs + runs-on: ubuntu-latest + + # Job-level permissions: specific needs only + permissions: + issues: write + pull-requests: write + + steps: + - name: Run stale action + uses: actions/stale@v9 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + + # Stale PR Configuration + days-before-stale: 60 + days-before-close: 14 + + stale-pr-message: | + This pull request has been inactive for 60 days and will be marked as stale. + + If you're still working on this, please: + - Update the PR with recent changes + - Respond to any review comments + - Rebase on the latest main branch + + The PR will be closed in 14 days if there's no activity. + + If you need help or have questions, feel free to ask! We appreciate your contribution. 🙏 + + close-pr-message: | + This pull request was automatically closed due to inactivity. + + If you'd like to continue this work, feel free to: + - Reopen this PR with updates + - Create a new PR with a fresh rebase + - Comment here if you need assistance + + Thank you for your contribution! ❤️ + + stale-pr-label: 'stale' + + # Stale Issue Configuration + days-before-issue-stale: 90 + days-before-issue-close: 30 + + stale-issue-message: | + This issue has been inactive for 90 days and will be marked as stale. + + If this is still relevant, please: + - Provide an update or additional context + - Confirm you can still reproduce the issue + - Let us know if you're working on a fix + + The issue will be closed in 30 days if there's no activity. + + close-issue-message: | + This issue was automatically closed due to inactivity. + + If this is still a problem, feel free to: + - Reopen with updated information + - Create a new issue with current details + + Thank you for reporting! 🙏 + + stale-issue-label: 'stale' + + # Exemptions - Never mark these as stale + exempt-pr-labels: 'security,critical,in-progress,on-hold,dependencies' + exempt-issue-labels: 'security,critical,roadmap,pinned,on-hold,help-wanted,good-first-issue' + + # Additional Configuration + operations-per-run: 100 + remove-stale-when-updated: true + + # Custom labels for better organization + ascending: false # Process newest first + + # Prevent closing issues/PRs that have recent comments + exempt-all-milestones: false + + # Enable debug output for troubleshooting + debug-only: false From 69a77627abf09bc9ad1372d8bffdb77db05a5613 Mon Sep 17 00:00:00 2001 From: Ronit Sabhaya Date: Wed, 5 Nov 2025 09:18:22 -0600 Subject: [PATCH 2/5] ci: add stale PR and issue management workflow --- .github/workflows/{stale.yml => stale-pr.yml} | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) rename .github/workflows/{stale.yml => stale-pr.yml} (80%) diff --git a/.github/workflows/stale.yml b/.github/workflows/stale-pr.yml similarity index 80% rename from .github/workflows/stale.yml rename to .github/workflows/stale-pr.yml index 96b2b40c..7e0d43e3 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale-pr.yml @@ -2,10 +2,9 @@ name: Stale PR and Issue Management on: schedule: - - cron: '0 0 * * *' # Daily at midnight UTC - workflow_dispatch: # Allow manual triggering + - cron: '0 0 * * *' + workflow_dispatch: -# Top-level permissions: least permissive (following PR #781 pattern) permissions: contents: read @@ -14,7 +13,6 @@ jobs: name: Mark stale issues and PRs runs-on: ubuntu-latest - # Job-level permissions: specific needs only permissions: issues: write pull-requests: write @@ -25,7 +23,6 @@ jobs: with: repo-token: ${{ secrets.GITHUB_TOKEN }} - # Stale PR Configuration days-before-stale: 60 days-before-close: 14 @@ -53,7 +50,6 @@ jobs: stale-pr-label: 'stale' - # Stale Issue Configuration days-before-issue-stale: 90 days-before-issue-close: 30 @@ -78,19 +74,13 @@ jobs: stale-issue-label: 'stale' - # Exemptions - Never mark these as stale exempt-pr-labels: 'security,critical,in-progress,on-hold,dependencies' exempt-issue-labels: 'security,critical,roadmap,pinned,on-hold,help-wanted,good-first-issue' - # Additional Configuration operations-per-run: 100 remove-stale-when-updated: true - # Custom labels for better organization - ascending: false # Process newest first - - # Prevent closing issues/PRs that have recent comments + ascending: false exempt-all-milestones: false - # Enable debug output for troubleshooting - debug-only: false + debug-only: True From bd658683682f5881df14a49926de91a112a835bf Mon Sep 17 00:00:00 2001 From: Ronit Sabhaya Date: Wed, 5 Nov 2025 10:00:09 -0600 Subject: [PATCH 3/5] update the pr stale and removed issues job, changed the timeline --- .github/workflows/stale-pr.yml | 49 +++++++--------------------------- 1 file changed, 9 insertions(+), 40 deletions(-) diff --git a/.github/workflows/stale-pr.yml b/.github/workflows/stale-pr.yml index 7e0d43e3..53dc16a1 100644 --- a/.github/workflows/stale-pr.yml +++ b/.github/workflows/stale-pr.yml @@ -1,4 +1,4 @@ -name: Stale PR and Issue Management +name: Stale PR Management on: schedule: @@ -10,11 +10,10 @@ permissions: jobs: stale: - name: Mark stale issues and PRs + name: Mark stale PRs runs-on: ubuntu-latest permissions: - issues: write pull-requests: write steps: @@ -23,18 +22,18 @@ jobs: with: repo-token: ${{ secrets.GITHUB_TOKEN }} - days-before-stale: 60 - days-before-close: 14 + days-before-stale: 14 + days-before-close: 30 stale-pr-message: | - This pull request has been inactive for 60 days and will be marked as stale. + This pull request has been inactive for 2 weeks and will be marked as stale. If you're still working on this, please: - Update the PR with recent changes - Respond to any review comments - Rebase on the latest main branch - The PR will be closed in 14 days if there's no activity. + The PR will be closed in 30 days if there's no activity. If you need help or have questions, feel free to ask! We appreciate your contribution. 🙏 @@ -50,37 +49,7 @@ jobs: stale-pr-label: 'stale' - days-before-issue-stale: 90 - days-before-issue-close: 30 + days-before-issue-stale: -1 + days-before-issue-close: -1 - stale-issue-message: | - This issue has been inactive for 90 days and will be marked as stale. - - If this is still relevant, please: - - Provide an update or additional context - - Confirm you can still reproduce the issue - - Let us know if you're working on a fix - - The issue will be closed in 30 days if there's no activity. - - close-issue-message: | - This issue was automatically closed due to inactivity. - - If this is still a problem, feel free to: - - Reopen with updated information - - Create a new issue with current details - - Thank you for reporting! 🙏 - - stale-issue-label: 'stale' - - exempt-pr-labels: 'security,critical,in-progress,on-hold,dependencies' - exempt-issue-labels: 'security,critical,roadmap,pinned,on-hold,help-wanted,good-first-issue' - - operations-per-run: 100 - remove-stale-when-updated: true - - ascending: false - exempt-all-milestones: false - - debug-only: True + remove-stale-when-updated: true \ No newline at end of file From 21845817af5d2501b967e70963e47979d56b3fba Mon Sep 17 00:00:00 2001 From: Ronit Sabhaya Date: Wed, 5 Nov 2025 12:53:50 -0600 Subject: [PATCH 4/5] Address Katie's feedback: update timelines, clarify messages, remove emojis --- .github/workflows/stale-pr.yml | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/.github/workflows/stale-pr.yml b/.github/workflows/stale-pr.yml index 53dc16a1..1e5c9a47 100644 --- a/.github/workflows/stale-pr.yml +++ b/.github/workflows/stale-pr.yml @@ -22,34 +22,32 @@ jobs: with: repo-token: ${{ secrets.GITHUB_TOKEN }} - days-before-stale: 14 - days-before-close: 30 + days-before-stale: 30 + days-before-close: 45 stale-pr-message: | - This pull request has been inactive for 2 weeks and will be marked as stale. + This pull request has been inactive for 30 days and will be marked as stale. - If you're still working on this, please: - - Update the PR with recent changes - - Respond to any review comments + If you're still working on this, please update the PR (any of the following): + - Add new commits or respond to review comments - Rebase on the latest main branch + - Comment with a status update - The PR will be closed in 30 days if there's no activity. - - If you need help or have questions, feel free to ask! We appreciate your contribution. 🙏 + The PR will be closed in 45 days if there's no activity. close-pr-message: | This pull request was automatically closed due to inactivity. - If you'd like to continue this work, feel free to: - - Reopen this PR with updates + If you'd like to continue this work: + - Reopen this PR with updates, or - Create a new PR with a fresh rebase - - Comment here if you need assistance - Thank you for your contribution! ❤️ + Feel free to comment here if you need assistance. + + Thank you for your contribution! stale-pr-label: 'stale' - days-before-issue-stale: -1 - days-before-issue-close: -1 + exempt-pr-labels: 'security,critical,dependencies' - remove-stale-when-updated: true \ No newline at end of file + remove-pr-stale-when-updated: true \ No newline at end of file From 49b427d65e4a4359569d062c7b5682d41ba9768c Mon Sep 17 00:00:00 2001 From: Ronit Sabhaya Date: Wed, 12 Nov 2025 10:31:55 -0600 Subject: [PATCH 5/5] Fixed the issues: write suggested by katie and removed unwanted labels --- .github/workflows/stale-pr.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/stale-pr.yml b/.github/workflows/stale-pr.yml index 1e5c9a47..9274f7be 100644 --- a/.github/workflows/stale-pr.yml +++ b/.github/workflows/stale-pr.yml @@ -14,6 +14,7 @@ jobs: runs-on: ubuntu-latest permissions: + issues: write pull-requests: write steps: @@ -21,6 +22,7 @@ jobs: uses: actions/stale@v9 with: repo-token: ${{ secrets.GITHUB_TOKEN }} + only-labels: 'test-stale-pr' days-before-stale: 30 days-before-close: 45 @@ -48,6 +50,4 @@ jobs: stale-pr-label: 'stale' - exempt-pr-labels: 'security,critical,dependencies' - remove-pr-stale-when-updated: true \ No newline at end of file