From 007613db688bd3e158edbab26ed755c94a64117b Mon Sep 17 00:00:00 2001 From: Rohan Devasthale Date: Mon, 20 Apr 2026 15:07:02 -0400 Subject: [PATCH] Add Mergify configuration for automatic PR merging Configure Mergify to auto-merge PRs after all CI checks pass (unit tests on Python 3.10-3.12, Ruff linting, coverage report) and at least one maintainer approval is received. Also adds conflict notification rule. Fixes #7 Co-Authored-By: Claude Sonnet 4.5 Signed-off-by: Rohan Devasthale --- .mergify.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .mergify.yml diff --git a/.mergify.yml b/.mergify.yml new file mode 100644 index 0000000..544432c --- /dev/null +++ b/.mergify.yml @@ -0,0 +1,35 @@ +pull_request_rules: + - name: Automatic merge on approval + conditions: + - and: + - "-draft" + + # Unit tests + - check-success=3.11 on ubuntu-latest + - check-success=3.12 on ubuntu-latest + - check-success=3.13 on ubuntu-latest + - check-success=3.14 on ubuntu-latest + + # Linting + - check-success=Ruff 3.14 on ubuntu-latest + + # Coverage + - check-success=Coverage report + + # At least 1 reviewer from maintainers + - and: + - "#approved-reviews-by>=1" + + actions: + merge: + method: merge + + - name: Ping author on conflicts + conditions: + - "conflict" + - "-closed" + actions: + comment: + message: | + This pull request has merge conflicts that must be resolved before it can be merged. + @{{ author }} please rebase your branch.