diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml new file mode 100644 index 00000000..03a37eb2 --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,31 @@ +name: Close stale issues and PRs +on: + schedule: + - cron: "30 1 * * *" + workflow_dispatch: + issue_comment: + types: [created] + +jobs: + stale: + runs-on: ubuntu-latest + steps: + - id: create_token + uses: tibdex/github-app-token@v2 + with: + app_id: ${{ secrets.APP_ID }} + private_key: ${{ secrets.PRIVATE_KEY }} + + - uses: actions/stale@v8 + with: + stale-issue-message: "This issue is stale because it has been open 10 days with no activity. Remove stale label or comment or this will be closed in 7 days." + stale-pr-message: "This PR is stale because it has been open 7 days with no activity. Remove stale label or comment or this will be closed in 4 days." + close-issue-message: "This issue was closed because it has been stale for 17 days with no activity." + close-pr-message: "This PR was closed because it has been stale for 14 days with no activity." + days-before-issue-stale: 10 + days-before-pr-stale: 7 + days-before-issue-close: 17 + days-before-pr-close: 14 + exempt-pr-labels: not-stale + exempt-issue-labels: not-stale + repo-token: ${{ steps.create_token.outputs.token }}