name: Close stale issues

on:
  schedule:
    - cron: '0 0 * * *'  # Run daily at midnight UTC

permissions:
  issues: write

jobs:
  stale:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/stale@v9
        with:
          stale-issue-message: 'This issue has been marked as stale due to inactivity. It will be closed in 7 days if there is no further activity.'
          close-issue-message: 'Closed due to inactivity. Feel free to reopen if this is still relevant.'
          days-before-stale: 21
          days-before-close: 7
          stale-issue-label: 'stale'
          only-labels: 'feedback'
