# SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors
# SPDX-License-Identifier: GPL-2.0-or-later
name: 'Close stale issues'

on:
  schedule:
    - cron: '30 */8 * * *'

permissions:
  contents: read

jobs:
  stale:
    runs-on: ubuntu-latest

    permissions:
      issues: write

    steps:
      - uses: actions/stale@3a9db7e6a41a89f618792c92c0e97cc736e1b13f # v10.0.0
        with:
          operations-per-run: 1500
          days-before-stale: 28
          days-before-close: 14
          days-before-pr-close: -1
          stale-issue-label: 'stale'
          only-labels: 'needs info'
          exempt-issue-labels: '1. to develop,2. developing,3. to review,4. to release,security'
          stale-issue-message: >
            This issue has been automatically marked as stale because it has not had
            recent activity and seems to be missing some essential information.
            It will be closed if no further activity occurs. Thank you
            for your contributions.
          exempt-all-pr-milestones: true
