diff --git a/.github/workflows/stale.yaml b/.github/workflows/stale.yaml new file mode 100644 index 0000000..edd578a --- /dev/null +++ b/.github/workflows/stale.yaml @@ -0,0 +1,26 @@ +name: 'Close stale issues' +on: + schedule: + - cron: '0 0 * * *' +jobs: + stale: + runs-on: ubuntu-latest + steps: + - uses: actions/stale@v3 + with: + close-issue-message: ${{ env.CLOSE_MESSAGE }} + close-pr-message: ${{ env.CLOSE_MESSAGE }} + days-before-stale: 30 + days-before-close: 5 + exempt-issue-labels: ${{ env.EXEMPT_LABEL }} + exempt-pr-labels: ${{ env.EXEMPT_LABEL }} + repo-token: ${{ secrets.GITHUB_TOKEN }} + stale-issue-label: ${{ env.STALE_LABEL }} + stale-pr-label: ${{ env.STALE_LABEL }} + stale-issue-message: ${{ env.STALE_MESSAGE }} + stale-pr-message: ${{ env.STALE_MESSAGE }} + env: + CLOSE_MESSAGE: 'This issue has been closed because it is stale. Reopen if necessary.' + EXEMPT_LABEL: 'status: needs discussion' + STALE_LABEL: 'status: stale' + STALE_MESSAGE: 'This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days' diff --git a/package.json b/package.json index 29a3aa4..8590c01 100644 --- a/package.json +++ b/package.json @@ -73,6 +73,7 @@ "xo": { "prettier": true, "rules": { + "no-warning-comments": "off", "sort-imports": "error", "sort-keys": "error", "sort-vars": "error"