Stale issue handler #777
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 'Stale issue handler' | |
on: | |
workflow_dispatch: | |
schedule: | |
# This runs every day 20 minutes before midnight: https://crontab.guru/#40_23_*_*_* | |
- cron: '40 23 * * *' | |
jobs: | |
stale: | |
runs-on: ubuntu-latest | |
if: github.repository_owner == 'vercel' | |
steps: | |
- uses: actions/stale@v9 | |
id: issue-stale | |
name: 'Mark stale issues, close stale issues' | |
with: | |
repo-token: ${{ secrets.STALE_TOKEN }} | |
ascending: true | |
days-before-issue-stale: 730 # issues with no activity in over two years | |
days-before-issue-close: 7 | |
days-before-pr-close: -1 | |
days-before-pr-stale: -1 | |
remove-issue-stale-when-updated: true | |
stale-issue-label: 'stale' | |
stale-issue-message: 'This issue has been automatically marked as stale due to two years of inactivity. It will be closed in 7 days unless there’s further input. If you believe this issue is still relevant, please leave a comment or provide updated details. Thank you.' | |
close-issue-message: 'This issue has been automatically closed due to two years of inactivity. If you’re still experiencing a similar problem or have additional details to share, please open a new issue following our current issue template. Your updated report helps us investigate and address concerns more efficiently. Thank you for your understanding!' | |
operations-per-run: 300 # 1 operation per 100 issues, the rest is to label/comment/close | |
- uses: actions/stale@v9 | |
id: stale-no-repro | |
name: 'Close stale issues with no reproduction' | |
with: | |
repo-token: ${{ secrets.STALE_TOKEN }} | |
any-of-labels: 'please add a complete reproduction' | |
close-issue-message: 'This issue has been automatically closed due to 2 days of inactivity and the absence of a complete reproduction. If you believe this was done in error, please leave a comment. If you are experiencing a similar issue, consider opening a new issue with a complete reproduction. Thank you.' | |
days-before-issue-close: 1 | |
days-before-issue-stale: 2 | |
days-before-pr-close: -1 | |
days-before-pr-stale: -1 | |
operations-per-run: 300 # 1 operation per 100 issues, the rest is to label/comment/close | |
- uses: actions/stale@v9 | |
id: stale-simple-repro | |
name: 'Close issues with no simple repro' | |
with: | |
repo-token: ${{ secrets.STALE_TOKEN }} | |
any-of-labels: 'please simplify reproduction' | |
close-issue-message: 'This issue has been automatically closed due to 14 days of inactivity and the absence of a simple reproduction for investigation. If you believe this was done in error, please leave a comment. If you are experiencing a similar issue, consider opening a new issue with a simple reproduction. Thank you.' | |
days-before-issue-close: 1 | |
days-before-issue-stale: 14 | |
days-before-pr-close: -1 | |
days-before-pr-stale: -1 | |
operations-per-run: 300 # 1 operation per 100 issues, the rest is to label/comment/close | |
- uses: actions/stale@v9 | |
id: stale-no-canary | |
name: 'Close issues not verified on canary' | |
with: | |
repo-token: ${{ secrets.STALE_TOKEN }} | |
any-of-labels: 'please verify canary' | |
close-issue-message: 'This issue has been automatically closed due to 14 days of inactivity and the absence of testing against next@canary. If you believe this was done in error, please leave a comment. If you are experiencing a similar issue, consider opening a new issue with a reproduction. Thank you.' | |
days-before-issue-close: 1 | |
days-before-issue-stale: 14 | |
days-before-pr-close: -1 | |
days-before-pr-stale: -1 | |
operations-per-run: 300 # 1 operation per 100 issues, the rest is to label/comment/close |