name: No Response

# Automatically close issues labeled 'more-info-needed' after 7 days of inactivity
on:
  schedule:
    # Schedule for five minutes after the hour, every hour
    - cron: '5 * * * *'

permissions:
  issues: write

jobs:
  noResponse:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/stale@4391f3da665fdf50b6810c1a66712fb9ba21aa93 # v11.0.0
        with:
          repo-token: ${{ secrets.GITHUB_TOKEN }}
          only-issue-labels: 'more-info-needed'
          days-before-issue-stale: -1  # Skip stale state, go directly to close
          days-before-issue-close: 7   # Close after 7 days of inactivity
          days-before-pr-stale: -1     # Don't process PRs
          days-before-pr-close: -1     # Don't process PRs
          remove-stale-when-updated: true
          close-issue-message: >
            Thank you for your issue!

            We haven't gotten a response to our questions above. With only the
            information that is currently in the issue, we don't have enough
            information to take action. We're going to close this but don't
            hesitate to reach out if you have or find the answers we need. If
            you answer our questions above, this issue will automatically
            reopen.
          close-issue-reason: 'not_planned'