name: "Pull Request Labeler"
on:
  pull_request_target:
    types: [opened, reopened, ready_for_review]

jobs:
  triage:
    permissions:
      contents: read
      pull-requests: write
    runs-on: ubuntu-latest
    if: ${{ !github.event.pull_request.draft }}
    steps:
    - uses: actions/labeler@v5
      with:
        repo-token: "${{ secrets.GITHUB_TOKEN }}"
        configuration-path: .github/pr-labeler.yml
