name: 'Manage stale issues'

on:
  schedule:
  - cron: '0 0 * * *'

jobs:
  stale:
    runs-on: ubuntu-latest

    steps:

    - name: Stale Bot
      uses: actions/stale@v3
      with:
        repo-token: ${{ secrets.GITHUB_TOKEN }}

        # Number of days of inactivity before an issue or PR is considered stale
        days-before-stale: 15

        # Number of days of inactivity before a stale issue or PR is closed
        days-before-close: 30

        # Issues or PRs with these labels will never be considered stale
        exempt-pr-labels: stalebot ignore

        # Label to use when marking an issue or PR as stale
        stale-pr-label: waiting

        # Comment to post when marking an issue or PR as stale
        stale-pr-message: |
          Hi all! This thread has not had any recent activity.
          Are there any updates? Thanks!

        # Comment to post when closing a stale issue or PR
        close-pr-message: |
          Hi everyone.
          This thread is being closed as there was no response to the previous prompt.
          However, please leave a comment whenever you're ready to resume,
          so the thread can be reopened. Thanks again!
