name: Stale Issues

on:
  workflow_dispatch:

jobs:
  stale:
    runs-on: ubuntu-latest
    steps:
    - name: Handle Stale Issues
      uses: jvalkeal/issue-handler@v0.0.6
      with:
        token: ${{ secrets.GITHUB_TOKEN }}
        dry-run: true
        config: >
          {
            "recipes": [
              {
                "name": "Handle stale issues",
                "type": "staleIssues",
                "issueSince": "2020-08-01",
                "issueBeforeStale": 60,
                "issueBeforeClose": 7,
                "issueStaleMessage": "This issue is stale because it has been open 60 days with no activity. Remove status/stale label or comment or this will be closed in 7 days",
                "issueCloseMessage": "Closing stale issue due to inactivity",
                "issueStaleLabel": "status/stale",
                "issueCloseLabel": "status/closed-as-stale",
                "issueExemptLabels": [
                  "status/on-hold",
                  "type/bug",
                  "type/need-investigation"
                ],
                "issueUnstaleWhenUpdated": true
              }
            ]
          }
