Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/vitest-dev/vscode. VS Code extension for Vitest vitest.dev/vscode
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839name: Issue Close Require
on: schedule: - cron: '0 0 * * *'
permissions: issues: write
jobs: close-issues: if: github.repository == 'vitest-dev/vscode' runs-on: ubuntu-latest steps: - name: needs reproduction uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7 with: script: | const inactiveDays = 3; const cutoff = Date.now() - inactiveDays * 24 * 60 * 60 * 1000; const issues = await github.paginate(github.rest.issues.listForRepo, { owner: context.repo.owner, repo: context.repo.repo, labels: 'needs reproduction', state: 'open', per_page: 100, }); for (const issue of issues) { if (issue.pull_request) continue; if (new Date(issue.updated_at).getTime() > cutoff) continue; await github.rest.issues.update({ owner: context.repo.owner, repo: context.repo.repo, issue_number: issue.number, state: 'closed', state_reason: 'not_planned', }); }