name: "PR Formatting"

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

permissions:
  statuses: write

jobs:
  title-check:
    name: Title Check
    runs-on: ubuntu-latest
    steps:
      - name: Harden Runner
        uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0
        with:
          egress-policy: audit

      - name: Check PR Title
        uses: amannn/action-semantic-pull-request@v6
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
