name: 'Close stale issues and PRs'
on:
  schedule:
    - cron: '30 1 * * *'
  workflow_dispatch:

jobs:
  stale:
    if: github.repository == 'lvgl/lvgl'
    runs-on: ubuntu-24.04
    steps:
      - uses: actions/stale@v9
        with:
          repo-token: ${{ secrets.LVGL_BOT_TOKEN }}
          stale-issue-message: |
            We need some feedback on this issue.

            Now we mark this as "Abandoned" because there was no activity here for 14 days.

            Remove the "Stale" label or comment else this will be closed in 7 days.
          stale-pr-message: |
            We need some feedback on this pull request.

            Now we mark this as "Abandoned" because there was no activity here for 14 days.

            Remove the "Abandoned" label or comment else this will be closed in 7 days.
          close-issue-message: |
            As there was no activity here for a while we close this issue. But don't worry, the conversation is still here and you can get back to it at any time.

            Feel free to comment if you have remarks or ideas on this topic.
          days-before-stale: 14
          days-before-close: 7
          exempt-issue-labels: '🔥 Important'
          exempt-pr-labels: '🔥 Important'
          stale-issue-label: '💤 Stale'
          stale-pr-label: '💤 Stale'
          close-issue-label: '🪹 Abandoned'
          close-pr-label: '🪹 Abandoned'
