name: "Detect Merge Conflicts"
on:
  workflow_dispatch:
  pull_request:
    branches:
      - master
      - 4*
      
  pull_request_target:
    types: [synchronize]

jobs:
  main:
    runs-on: ubuntu-latest
    steps:
      - name: check if prs are conflicted
        uses: eps1lon/actions-label-merge-conflict@v3
        with:
          dirtyLabel: "conflicts-detected"
          repoToken: "${{ secrets.GITHUB_TOKEN }}"
          commentOnDirty: "This pull request has conflicts, please resolve those before we can evaluate the pull request."
          commentOnClean: "Conflicts have been resolved. A maintainer will review the pull request shortly."
