name: No Response

# Both `issue_comment` and `scheduled` event types are required for this Action
# to work properly.
on:
  issue_comment:
    types: [created]
  schedule:
    # Run daily at midnight.
    - cron: '0 0 * * *'

permissions: {}

jobs:
  noResponse:
    # As this action runs on a schedule, only run it in the FreeTubeApp/FreeTube repository to avoid unnecessary GitHub Actions usage/billing in forks.
    # If a fork does need this workflow, they can change this condition in their fork to include their repository.
    if: github.repository == 'FreeTubeApp/FreeTube'

    runs-on: ubuntu-slim

    permissions:
      issues: write

    steps:
      - uses: lee-dohm/no-response@9bb0a4b5e6a45046f00353d5de7d90fb8bd773bb #v0.5.0
        with:
          token: ${{ github.token }}
          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.
          daysUntilClose: 7
          responseRequiredLabel: "U: Waiting for Response from Author"
