name: Linting PR

on:
  pull_request:
    types:
      - opened
      - edited
      - reopened

jobs:
  lint-pr-title:
    name: PR Title Lint
    runs-on: ubuntu-latest
    steps:
      - uses: amannn/action-semantic-pull-request@v5
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          types: |
            fix
            feat
            perf
            refactor
            test
            style
            docs
            ci
            build
            chore
          requireScope: true
          ignoreLabels: |
            bot
