name: pr-labeler

on:
  - pull_request_target

jobs:
  pr-labeler:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/labeler@main
        with:
          repo-token: "${{ secrets.GITHUB_TOKEN }}"
          configuration-path: .github/pr-labeler-file-path.yml
          # workaround for problem: https://github.com/wesnoth/wesnoth/commit/958c82d0867568057caaf58356502ec8c87d8366
          sync-labels: ""
      - uses: TimonVS/pr-labeler-action@v3
        with:
          configuration-path: .github/pr-labeler-branch-name.yml
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Evaluate: https://github.com/srvaroa/labeler
