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

permissions: {}

jobs:
  triage:
    permissions:
      contents: read
      pull-requests: write

    runs-on: ubuntu-slim
    if: ${{ !github.event.pull_request.draft }}
    steps:
    - uses: actions/labeler@634933edcd8ababfe52f92936142cc22ac488b1b #v6.0.1
      with:
        repo-token: "${{ secrets.GITHUB_TOKEN }}"
        configuration-path: .github/pr-labeler.yml
