name: PR merged
on:
  pull_request_target:
    types: [closed]

permissions:
  contents: write
  pull-requests: write
  
jobs:
  label-merged:
    name: Changelog needed
    runs-on: ubuntu-latest
    if: github.event.pull_request.merged == true
    steps:
      - uses: actions/labeler@main
        with:
          repo-token: ${{ secrets.GITHUB_TOKEN }}
          configuration-path: .github/labeler_merged.yml
