name: 'Label PR'

on:
  pull_request_target:
    types: [opened, edited, synchronize]
    branches:
      - main

jobs:
  label: 
    permissions:
      contents:  read
      pull-requests: write
      issues: write
    name: Label Pull Request
    runs-on: ubuntu-latest
    steps:
      - name:  Checkout configuration
        uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 #7.0.1
        # Hier wird bewusst main ausgecheckt für die Config-Datei
        
      - name: Label issues
        uses: github/issue-labeler@c1b0f9f52a63158c4adc09425e858e87b32e9685 #3.4.0
        with:
          configuration-path: .github/labeler.yml
          include-title: 1
          include-body: 0
          enable-versioned-regex: 0
          repo-token: ${{ secrets.GITHUB_TOKEN }}
