name: "Pull Request Labeler"
on:
- pull_request_target

jobs:
  labeler:
    permissions:
      contents: read
      pull-requests: write
    runs-on: ubuntu-22.04
    steps:
    - uses: actions/labeler@v5
      with:
        sync-labels: true

    # TODO: run scripts based on labels!
    # - id: run-translation-scripts
    #   if: contains(steps.label-the-PR.outputs.all-labels, 'i18n')
    #   run: |
    #     echo "Running translation scripts"
    #     # Generate .pot -> .po -> .json files
