name: "Pull Request Labeler"
on:
  - pull_request_target

permissions:
  contents: read

jobs:
  labeler:
    permissions:
      contents: read # for actions/labeler to determine modified files
      pull-requests: write # for actions/labeler to add labels to PRs
    runs-on: depot-ubuntu-22.04-4
    steps:
      - uses: actions/labeler@v4 # v5 is broken, ref https://github.com/actions/labeler/issues/712. Do not bump.
        with:
          configuration-path: .github/pr_labeler.yml
          repo-token: "${{ secrets.GITHUB_TOKEN }}"
