name: No Response

# Both `issue_comment` and `scheduled` event types are required for this Action
# to work properly.
on:
  issue_comment:
    types:
      - created
  schedule:
    # “At 00:00.” https://crontab.guru/#0_0_*_*_*
    - cron: "0 0 * * *"

permissions:
  issues: write

jobs:
  no-response:
    if: github.event_name != 'schedule' || github.repository == 'prettier/prettier'
    runs-on: ubuntu-latest
    steps:
      - uses: lee-dohm/no-response@9bb0a4b5e6a45046f00353d5de7d90fb8bd773bb # v0.5.0
        with:
          token: ${{ github.token }}
          daysUntilClose: 14
          responseRequiredLabel: "status:awaiting response"
          closeComment: >
            This issue has been automatically closed because there has been no response
            to our request for more information from the original author. With only the
            information that is currently in the issue, we don't have enough information
            to take action. Please reach out if you have or find the answers we need so
            that we can investigate further.
