Close stale issues and pull requests #463
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 pull requests" | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "12 5 * * *" # arbitrary time not to DDOS GitHub | |
jobs: | |
stale: | |
runs-on: ubuntu-latest | |
env: | |
GH_TOKEN: ${{ github.token }} | |
steps: | |
- name: Check rate_limit before | |
run: gh api /rate_limit | |
- uses: actions/stale@v9 | |
with: | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
stale-pr-message: 'This PR was marked stale due to lack of activity. It will be closed in 14 days.' | |
close-pr-message: 'Closed as inactive. Feel free to reopen if this PR is still being worked on.' | |
close-issue-message: 'This issue has been closed as inactive because it has been stale for 120 days with no activity.' | |
close-issue-label: 'closed as inactive' | |
days-before-pr-stale: 14 | |
days-before-issue-stale: -1 # Stale label is applied by mark-issues-as-stale.yml | |
days-before-pr-close: 14 | |
days-before-issue-close: 60 | |
exempt-issue-labels: 'never stale' | |
ascending: true | |
operations-per-run: 6000 | |
- name: Check rate_limit after | |
run: gh api /rate_limit | |