diff --git a/.github/workflows/conflicting-pr-label.yml b/.github/workflows/conflicting-pr-label.yml index fb4a14ed..f05eae1c 100644 --- a/.github/workflows/conflicting-pr-label.yml +++ b/.github/workflows/conflicting-pr-label.yml @@ -7,8 +7,8 @@ name: PullRequestConflicting on: push: branches: [ main ] - pull_request: - types: [synchronize] + pull_request_target: + types: [opened, reopened, synchronize] branches: [ main ] permissions: @@ -17,22 +17,19 @@ permissions: # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: - # This workflow contains a single job called "build" - build: + # This workflow contains a single job for labeling pull requests with merge conflicts + label-merge-conflicts: # The type of runner that the job will run on runs-on: ubuntu-latest # Steps represent a sequence of tasks that will be executed as part of the job steps: - - name: check if prs are dirty - uses: eps1lon/actions-label-merge-conflict@releases/2.x - if: env.LABELING_TOKEN != '' && env.LABELING_TOKEN != null - id: check - with: - dirtyLabel: "conflicting" - repoToken: "${{ secrets.GITHUB_TOKEN }}" - continueOnMissingPermissions: true - commentOnDirty: 'This pull request has conflicting changes, the author must resolve the conflicts before this pull request can be merged.' - commentOnClean: 'Conflicts have been resolved. A maintainer will take a look shortly.' - env: - LABELING_TOKEN: ${{secrets.GITHUB_TOKEN }} + - name: check merge conflicts + uses: eps1lon/actions-label-merge-conflict@0273be72a0bbd58fcd71d0d6c02c209b50d1e5e1 # v3.1.0 + id: check + with: + dirtyLabel: "conflicting" + repoToken: "${{ secrets.GITHUB_TOKEN }}" + continueOnMissingPermissions: true + commentOnDirty: 'This pull request has conflicting changes, the author must resolve the conflicts before this pull request can be merged.' + commentOnClean: 'Conflicts have been resolved. A maintainer will take a look shortly.'