Close stale issues and PRs #28
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 issues and PRs' | |
| on: | |
| schedule: | |
| - cron: '30 12 * * *' | |
| permissions: | |
| actions: write | |
| pull-requests: write | |
| jobs: | |
| stale: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/stale@b5d41d4e1d5dceea10e7104786b73624c18a190f # v10 | |
| with: | |
| stale-pr-message: 'This PR is stale because it has been open 21 days with no activity. It is flagged for removal. Remove stale label or set the PR to Draft or this will be closed in one day.' | |
| close-pr-message: 'This PR was closed because it has been stalled for 22 days with no activity. You can reopen this PR later if it is still necessary.' | |
| days-before-pr-stale: 21 | |
| days-before-pr-close: 1 | |
| exempt-pr-labels: wip, do-not-close | |
| exempt-draft-pr: true | |
| stale-draft-prs: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| pull-requests: write | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # 6.0.2 | |
| - uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # 8.0.0 | |
| with: | |
| script: | | |
| const { processStaleDraftPrs } = await import(`${process.env.GITHUB_WORKSPACE}/.github/scripts/stale-draft-prs.mjs`) | |
| await processStaleDraftPrs({ github, context, core }) |