diff --git a/.github/actions/checkout/action.yml b/.github/actions/checkout/action.yml index 205eefde25..b4f6ca7f21 100644 --- a/.github/actions/checkout/action.yml +++ b/.github/actions/checkout/action.yml @@ -80,6 +80,9 @@ runs: else echo "The cross mount cache has $freespace_human free space - continuing" fi + - name: Add patch conflict problem matcher + shell: bash + run: echo "::add-matcher::src/electron/.github/problem-matchers/patch-conflict.json" - name: Gclient Sync if: steps.check-cache.outputs.cache_exists == 'false' shell: bash @@ -128,7 +131,11 @@ runs: echo "No changes to patches detected" fi fi - + - name: Remove patch conflict problem matcher + shell: bash + run: | + echo "::remove-matcher owner=merge-conflict::" + echo "::remove-matcher owner=patch-conflict::" # delete all .git directories under src/ except for # third_party/angle/ and third_party/dawn/ because of build time generation of files # gen/angle/commit.h depends on third_party/angle/.git/HEAD diff --git a/.github/problem-matchers/patch-conflict.json b/.github/problem-matchers/patch-conflict.json new file mode 100644 index 0000000000..e8324448cb --- /dev/null +++ b/.github/problem-matchers/patch-conflict.json @@ -0,0 +1,24 @@ +{ + "problemMatcher": [ + { + "owner": "merge-conflict", + "pattern": [ + { + "regexp": "^CONFLICT\\s\\(\\S+\\): (Merge conflict in \\S+)$", + "message": 1 + } + ] + }, + { + "owner": "patch-conflict", + "pattern": [ + { + "regexp": "^error: (patch failed: (\\S+):(\\d+))$", + "message": 1, + "file": 2, + "line": 3 + } + ] + } + ] +}