name: Lock Closed Issues

on:
  schedule:
    - cron: '0 0 * * *'

permissions: {}

jobs:
  action:
    if: github.repository == 'vitest-dev/vitest'
    runs-on: ubuntu-latest
    name: Lock Closed Issues
    permissions:
      issues: write # to lock issue
      pull-requests: write # to lock prs
    steps:
      - uses: dessant/lock-threads@7266a7ce5c1df01b1c6db85bf8cd86c737dadbe7 # v6.0.0
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}
          issue-inactive-days: '14'
          pr-inactive-days: '14'
          issue-lock-reason: ''
          pr-lock-reason: ''
          process-only: issues,prs
