Close Stale PRs #63
This file contains hidden or 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: 'Close Stale PRs' | |
| on: | |
| schedule: | |
| # Run daily at 1:00 AM UTC | |
| - cron: '0 1 * * *' | |
| workflow_dispatch: # Allows manual triggering | |
| permissions: | |
| pull-requests: write | |
| issues: write | |
| jobs: | |
| stale: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/stale@v9 | |
| with: | |
| # Only affect PRs, not issues | |
| days-before-issue-stale: -1 | |
| days-before-issue-close: -1 | |
| # Mark PR as stale after 21 days of inactivity | |
| days-before-pr-stale: 21 | |
| # Close PR 4 days after marking as stale (28 days total) | |
| days-before-pr-close: 7 | |
| # Messages | |
| stale-pr-message: 'This PR has been automatically marked as stale due to 21 days of inactivity. It will be closed in 7 days unless there is new activity.' | |
| close-pr-message: 'This PR has been automatically closed due to inactivity after being marked as stale. You may simply reopen it and continue working on it.' | |
| # Labels | |
| stale-pr-label: 'stale' | |
| # Optional: Exempt PRs with certain labels from being closed | |
| exempt-pr-labels: 'do-not-close' | |
| # Remove stale label when PR is updated | |
| remove-pr-stale-when-updated: true | |