name: Check Required Checkboxes

on:
  issues:
    types: [opened, edited]

permissions:
  contents: read
  issues: write

jobs:
  check-checkboxes:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout base branch
        uses: actions/checkout@v4
        with:
          persist-credentials: false

      - uses: actions/setup-node@v6
        with:
          node-version: 24

      - name: Install scripts
        run: cd .github/scripts && npm install --ignore-scripts

      - name: Check issue uses template
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        run: node --experimental-strip-types .github/scripts/issue-template-check-action.ts
