# SPDX-License-Identifier: Apache-2.0

name: "PR Title Check"
on:
  pull_request_target:
    types:
      - opened
      - reopened
      - edited
      - ready_for_review
      - review_requested
      - synchronize

defaults:
  run:
    shell: bash

permissions:
  statuses: write

concurrency:
  group: pr-checks-${{ github.workflow }}-${{ github.head_ref || github.run_id }}
  cancel-in-progress: true

jobs:
  title-check:
    name: Title Check
    runs-on: hiero-local-node-linux-medium
    steps:
      - name: Harden Runner
        uses: step-security/harden-runner@58077d3c7e43986b6b15fba718e8ea69e387dfcc # v2.15.1
        with:
          egress-policy: audit

      - name: Check PR Title
        uses: step-security/conventional-pr-title-action@e2a9b8d87a4b25077f0696ec3e2b4dd5a3f43734 # v3.2.4
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
