From 03abd003d2f9456c450c5e0068efeaf130b89f33 Mon Sep 17 00:00:00 2001 From: Yuriy Andamasov Date: Fri, 12 Jun 2026 21:05:27 -0700 Subject: chore: T8937: move conflict labeling+comment from eps1lon GHA to Mergify (#2103) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Removes the eps1lon `check-open-prs-conflict.yml` caller (which ran `eps1lon/actions-label-merge-conflict` on push to base branches to label conflicting PRs + comment) and replaces it with Mergify: - Conflict LABEL (`conflicts`): already handled by the inherited central `Label conflicting pull requests` rule (predicate `conflict`, toggle). Mergify re-evaluates continuously, so the GHA's push-triggered re-scan is covered natively — no local rule needed for the label. - Conflict COMMENT: a local additive rule `Comment on conflicting pull requests` (distinct name → does not replace the inherited label rule) posts the contributor-facing "please resolve" notice once when a PR enters conflict (Mergify dedupes the comment per rule+message). The GHA's clean-side "conflicts resolved" comment is intentionally NOT replicated — Mergify has no "was-conflicting-now-clean" predicate, and keying on `-conflict` would match every non-conflicting PR. This is the final piece of the T8937 Mergify-GHA retirement (the central `check-pr-conflict.yml` reusable was preserved pending this consumer; it is deleted in a follow-up vyos/.github PR once this merges). Advances: T8937 🤖 Generated by [robots](https://vyos.io) --- .github/mergify.yml | 26 ++++++++++++++++++++++++++ .github/workflows/check-open-prs-conflict.yml | 17 ----------------- 2 files changed, 26 insertions(+), 17 deletions(-) delete mode 100644 .github/workflows/check-open-prs-conflict.yml diff --git a/.github/mergify.yml b/.github/mergify.yml index 89d61a85..97d6e462 100644 --- a/.github/mergify.yml +++ b/.github/mergify.yml @@ -21,7 +21,33 @@ # The central config no longer enforces strict `T:` format — that # moved per-product-repo — so docs (a non-product repo) inherits only the # generic loose-title + body checks, no override needed. +# +# T8937 (2026-06): replaced the eps1lon `check-open-prs-conflict.yml` GHA +# caller (which ran `eps1lon/actions-label-merge-conflict` to label + comment +# on conflicting PRs) with Mergify. The inherited central rule `Label +# conflicting pull requests` already toggles the `conflicts` label; the local +# additive rule below restores the contributor-facing "please resolve" comment +# the GHA used to post. (The GHA's clean-side "conflicts resolved" comment has +# no Mergify equivalent — there is no "was-conflicting-now-clean" predicate — +# so it is intentionally not replicated.) extends: mergify merge_protections_settings: reporting_method: check-runs + +pull_request_rules: + # Additive (distinct name from the inherited `Label conflicting pull + # requests` rule, so both fire): post a one-time comment when a PR enters + # conflict, mirroring the retired eps1lon GHA's dirty-side notice. Mergify's + # comment action dedupes per rule+message, so it posts once when the PR + # becomes conflicting, not on every re-evaluation. + - name: Comment on conflicting pull requests + description: Notify the author when their PR develops a merge conflict. + conditions: + - conflict + - '-closed' + actions: + comment: + message: >- + @{{author}} this pull request has conflicts. Please resolve them + before we can evaluate the pull request. diff --git a/.github/workflows/check-open-prs-conflict.yml b/.github/workflows/check-open-prs-conflict.yml deleted file mode 100644 index 9e850045..00000000 --- a/.github/workflows/check-open-prs-conflict.yml +++ /dev/null @@ -1,17 +0,0 @@ -name: "Open PRs Conflicts checker" -on: - push: - branches: - - rolling - - sagitta - - circinus - workflow_dispatch: - -permissions: - contents: read - pull-requests: write - -jobs: - check-pr-conflict-call: - uses: vyos/.github/.github/workflows/check-pr-conflict.yml@production - secrets: inherit -- cgit v1.2.3