Close stale pull requests #706
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 pull requests" | |
| on: | |
| schedule: | |
| - cron: "12 3 * * *" # arbitrary time not to DDOS GitHub | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| stale: | |
| permissions: | |
| actions: write # for actions/stale to delete its old cache before saving new one | |
| pull-requests: write # required for closing stale PRs | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/stale@997185467fa4f803885201cee163a9f38240193d # v10.1.1 | |
| with: | |
| repo-token: ${{ secrets.GITHUB_TOKEN }} | |
| stale-pr-message: > | |
| This PR has been labeled as stale due to lack of activity. | |
| It will be automatically closed if there is no further activity over the next 7 days. | |
| exempt-pr-labels: 'never stale' | |
| # opt out of defaults to avoid marking issues as stale | |
| days-before-stale: -1 | |
| days-before-close: -1 | |
| # overrides the above only for pull requests | |
| days-before-pr-stale: 14 | |
| days-before-pr-close: 7 | |
| operations-per-run: 1000 |