name: Require PR label

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

jobs:
  label:
    runs-on: ubuntu-latest

    permissions:
      issues: write
      pull-requests: write

    steps:
      - uses: mheap/github-action-required-labels@v5
        with:
          mode: minimum
          count: 1
          labels: |
            changelog: Added
            changelog: Changed
            changelog: Deprecated
            changelog: Fixed
            changelog: Removed
            changelog: Security
            changelog: skip
