on:
  pull_request:
    types: [ opened, reopened, synchronize ]

env:
  NODE_ENV: ci

name: "Pull Requests"

jobs:
  tests:
    name: Tests
    uses: ./.github/workflows/tests.yml

  linters:
    name: Linters
    uses: ./.github/workflows/linters.yml

  eslint-review:
    name: ESLint Review
    runs-on: ubuntu-latest
    permissions:
      contents: read
      pull-requests: write
    steps:
      - uses: actions/checkout@v3
      - uses: reviewdog/action-eslint@v1
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}