Close stale issues and PRs #184
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: 'Close stale issues and PRs' | |
on: | |
schedule: | |
- cron: '30 */12 * * *' | |
env: | |
DAYS_BEFORE_ISSUE_STALE: 150 | |
DAYS_BEFORE_ISSUE_CLOSE: 30 | |
DAYS_BEFORE_PR_STALE: 150 | |
DAYS_BEFORE_PR_CLOSE: 60 | |
permissions: | |
contents: read | |
jobs: | |
stale: | |
permissions: | |
issues: write # for actions/stale to close stale issues | |
pull-requests: write # for actions/stale to close stale PRs | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/stale@v8 | |
with: | |
stale-issue-message: 'This issue is stale because it has been open ${{ env.DAYS_BEFORE_ISSUE_STALE }} days with no activity. Remove stale label or comment or this will be closed in ${{ env.DAYS_BEFORE_ISSUE_CLOSE }} days.' | |
close-issue-message: 'This issue has been stale for ${{ env.DAYS_BEFORE_ISSUE_CLOSE }} days and is being closed.' | |
days-before-issue-stale: ${{ env.DAYS_BEFORE_ISSUE_STALE }} | |
days-before-issue-close: ${{ env.DAYS_BEFORE_ISSUE_CLOSE }} | |
stale-pr-message: 'This PR is stale because it has been open ${{ env.DAYS_BEFORE_PR_STALE }} days with no activity. Remove stale label or comment or this will be closed in ${{ env.DAYS_BEFORE_PR_CLOSE }} days.' | |
close-pr-message: 'This PR has been stale for ${{ env.DAYS_BEFORE_PR_CLOSE }} days and is being closed. Apologies if this is still relevant, it can be hard to find the time to review and merge everything. Feel free to make sure it is up to date and open it again.' | |
days-before-pr-stale: ${{ env.DAYS_BEFORE_PR_STALE }} | |
days-before-pr-close: ${{ env.DAYS_BEFORE_PR_CLOSE }} | |
operations-per-run: 100 | |
ascending: true |