name: Merge Conflict Labeler

on:
  push:
    branches:
      - master
  pull_request:
  issue_comment:

permissions: {}
jobs:
  label:
    name: Labeling
    runs-on: ubuntu-latest
    if: ${{ github.repository == 'jellyfin/jellyfin' && github.event.issue.pull_request }}
    steps:
      - name: Apply label
        uses: eps1lon/actions-label-merge-conflict@1df065ebe6e3310545d4f4c4e862e43bdca146f0 # v3.0.3
        if: ${{ github.event_name == 'push' || github.event_name == 'pull_request'}}
        with:
          dirtyLabel: 'merge conflict'
          commentOnDirty: 'This pull request has merge conflicts. Please resolve the conflicts so the PR can be successfully reviewed and merged.'
          repoToken: ${{ secrets.JF_BOT_TOKEN }}
