name: Close Stale Issues
on:
  schedule:
    - cron: 0 6 * * *
  workflow_dispatch: {}

permissions:
  issues: write
  pull-requests: write
  actions: write

jobs:
  stale_issues:
    name: Close Stale Issues
    runs-on: ubuntu-latest
    if: github.repository == 'meshtastic/Meshtastic-Android'

    steps:
      - name: Stale PR+Issues
        uses: actions/stale@v10.1.0
        with:
          days-before-stale: 30
          stale-issue-message: This issue hasn not had any comment or update in the last 30 days. If it is still relevant, please post update comments. If no comments are made, this issue will be closed in 7 days.
          exempt-issue-labels: 'has sponsor,needs sponsor,help wanted,backlog,security issue,l10n,dependencies' 
          exempt-pr-labels: 'has sponsor,needs sponsor,help wanted,backlog,security issue,l10n,dependencies'
          operations-per-run: 100
