From 4e0dded547f48bd6b822d399b2a7004ff7c59730 Mon Sep 17 00:00:00 2001 From: Tom Rochette Date: Tue, 30 Jun 2026 21:42:59 -0400 Subject: [PATCH] ci: add merge-conflict label automation workflow (#1942) Adds label-merge-conflict workflow using eps1lon/actions-label-merge-conflict to label PRs with merge-conflict:true when they have conflicts. Triggers on push to main, pull_request_target (opened/synchronize/reopened), and manual dispatch. Uses the bot app token for label writes and is scoped to the openchamber/openchamber repo. --- .github/workflows/label-merge-conflict.yml | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/label-merge-conflict.yml diff --git a/.github/workflows/label-merge-conflict.yml b/.github/workflows/label-merge-conflict.yml new file mode 100644 index 00000000..8d61194e --- /dev/null +++ b/.github/workflows/label-merge-conflict.yml @@ -0,0 +1,31 @@ +name: label-merge-conflict + +on: + push: + branches: [main] + pull_request_target: + types: [opened, synchronize, reopened] + workflow_dispatch: + +permissions: {} + +jobs: + label: + if: ${{ github.repository == 'openchamber/openchamber' }} + runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: write + steps: + - name: Generate bot app token + id: app-token + uses: actions/create-github-app-token@fee1f7d63c2ff003460e3d139729b119787bc349 # v2.2.2 + with: + app-id: ${{ secrets.OC_REVIEW_APP_ID }} + private-key: ${{ secrets.OC_REVIEW_APP_PRIVATE_KEY }} + + - name: Label pull requests with merge conflicts + uses: eps1lon/actions-label-merge-conflict@0273be72a0bbd58fcd71d0d6c02c209b50d1e5e1 # v3.1.0 + with: + dirtyLabel: "merge-conflict:true" + repoToken: ${{ steps.app-token.outputs.token }}