From a352e23d950a2ce6744b1180bcf6d6343c170bb2 Mon Sep 17 00:00:00 2001 From: Jirka Borovec <6035284+Borda@users.noreply.github.com> Date: Mon, 12 Jan 2026 20:11:36 +0100 Subject: [PATCH] Switch PR Conflict Labeler workflow to `eps1lon/actions-label-merge-conflict` (#2076) * Switch PR Conflict Labeler workflow to `eps1lon/actions-label-merge-conflict` * Apply suggestions from code review --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/pr-conflict-labeler.yml | 28 ++++++++++++----------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/.github/workflows/pr-conflict-labeler.yml b/.github/workflows/pr-conflict-labeler.yml index f6a1e9c9..7a16adeb 100644 --- a/.github/workflows/pr-conflict-labeler.yml +++ b/.github/workflows/pr-conflict-labeler.yml @@ -1,25 +1,27 @@ -name: 🔴 PR Conflict Labeler +name: PR Conflict Labeler on: + # So that PRs touching the same files as the push are updated push: - branches: [main, develop] + branches: + - main + - develop + # So that the `dirtyLabel` is removed if conflicts are resolved + # We recommend `pull_request_target` so that github secrets are available. + # In `pull_request` we wouldn't be able to change labels of fork PRs pull_request_target: - types: [opened, synchronize, reopened, ready_for_review] + types: [synchronize] permissions: - contents: write pull-requests: write issues: write - jobs: - label: - name: Label PRs with conflicts + main: runs-on: ubuntu-latest - timeout-minutes: 10 steps: - - name: 🤖 Check conflicts and manage label - uses: sequelize/pr-auto-update-and-handle-conflicts@74929c430b8843e691e7b83d229d8d13d78d89e3 # pinned latest commit - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: check if prs are dirty + uses: eps1lon/actions-label-merge-conflict@v3 with: - conflict-label: has-conflict + dirtyLabel: "has conflicts" + removeOnDirtyLabel: "has conflicts" + repoToken: "${{ secrets.GITHUB_TOKEN }}"