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@v10
        with:
          repo-token: ${{ secrets.LVGL_BOT_TOKEN }}
          stale-issue-message: |
            We need some feedback on this issue.

            Now we mark this as "Stale" because there was no activity here for 60 days.

            Remove the "Stale" label or comment else this will be closed in 14 days.

            cc @kisvegabor, @liamHowatt, @uLipe, @AndreCostaaa
          stale-pr-message: |
            We need some feedback on this pull request.

            Now we mark this as "Stale" because there was no activity here for 60 days.

            Remove the "Stale" label or comment else this will be closed in 14 days.

            cc @kisvegabor, @liamHowatt, @uLipe, @AndreCostaaa
          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.

            cc @kisvegabor, @liamHowatt, @uLipe, @AndreCostaaa
          days-before-stale: 60
          days-before-close: 14
          exempt-issue-labels: '🔥 Important'
          exempt-pr-labels: '🔥 Important'
          stale-issue-label: '💤 Stale'
          stale-pr-label: '💤 Stale'
          close-issue-label: '🪹 Abandoned'
          close-pr-label: '🪹 Abandoned'
