name: Check Issue Template
on:
  issues:
    types:
      - opened
jobs:
  check_issue:
    runs-on: ubuntu-latest
    permissions:
      issues: write
    steps:
      - name: pull in script
        uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
        with:
          repository: jellyfin/jellyfin-triage-script
      - name: install python
        uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
        with:
          python-version: '3.12'
          cache: 'pip'
      - name: install python packages
        run: pip install -r main-repo-triage/requirements.txt
      - name: check and comment issue
        working-directory: ./main-repo-triage
        run: python3 single_issue_gha.py
        env:
          GH_TOKEN: ${{ secrets.JF_BOT_TOKEN }}
          GH_REPO: ${{ github.repository }}
          ISSUE: ${{ github.event.issue.number }}
