name: Audit PR

on:
  pull_request:
    types: [opened, synchronize]
    paths:
      - '**.js'
      - '**.jsx'
      - '**.ts'
      - '**.tsx'

jobs:
  audit:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v7

      - uses: ./.github/actions/react-auditor
        with:
          args: "src/ --fail-on error"
