From fd8bdaf2242e21ca5b628384434354f5905b02e1 Mon Sep 17 00:00:00 2001 From: Tom Wieczorek Date: Thu, 4 Jan 2024 17:34:45 +0100 Subject: [PATCH] Add GitHub label action for merge conflicts This helps to identify pull requests that have merge conflicts without needing to check each PR individually or using some GraphQL magic. This adds the "merge-conflict" label to conflicted PRs. Signed-off-by: Tom Wieczorek --- .github/workflows/conflicts.yaml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/conflicts.yaml diff --git a/.github/workflows/conflicts.yaml b/.github/workflows/conflicts.yaml new file mode 100644 index 000000000000..1fdc87637f34 --- /dev/null +++ b/.github/workflows/conflicts.yaml @@ -0,0 +1,27 @@ +name: Check for merge conflicts + +on: + push: + branches: + - main + - release-* + pull_request_target: + types: + - synchronize + branches: + - main + - release-* + +permissions: + contents: read + pull-requests: write + +jobs: + main: + runs-on: ubuntu-latest + steps: + - name: Check for merge conflicts + uses: eps1lon/actions-label-merge-conflict@v2.1.0 + with: + repoToken: ${{ secrets.GITHUB_TOKEN }} + dirtyLabel: merge-conflict