name: Lint PR Title

on:
  pull_request_target:
    types: [opened, edited, synchronize]

permissions:
  pull-requests: read

jobs:
  main:
    name: Validate PR title
    runs-on: ubuntu-latest
    steps:
      # WARNING: This workflow uses pull_request_target. Never add a checkout
      # or code execution step here — it would run attacker-controlled code
      # with write access to the repo.
      - uses: amannn/action-semantic-pull-request@48f256284bd46cdaab1048c3721360e808335d50 # v6
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          scopes: |
            deps
            deps-dev
            gfx
            gpu
            hint
            image
            keyboard
            mixer
            mouse
            ttf
            audio
            clipboard
            cpuinfo
            dialog
            event
            filesystem
            gamepad
            guid
            haptic
            iostream
            joystick
            log
            macros
            messagebox
            pen
            pixels
            properties
            raw_window_handle
            rect
            render
            sensor
            surface
            timer
            touch
            url
            util
            version
            video
          requireScope: false