From 98d1ec331203d9b5634d93b8f11d09fbee91eab7 Mon Sep 17 00:00:00 2001 From: Lalatendu Mohanty Date: Wed, 29 Oct 2025 12:06:51 -0400 Subject: [PATCH] chore(mergify): add automatic rebase rule for approved PRs Add a new Mergify rule to automatically rebase approved PRs when the base branch (main) is updated. This keeps PRs current with the latest code and ensures tests run on the actual merge result. The rebase happens automatically when: - PR is not a draft - PR has no merge conflicts - PR is still open - PR has at least 1 approval from maintainers Benefits: - Prevents stale PRs that fall behind main - Catches integration issues early - Ensures tests run on latest codebase - Maintains cleaner linear commit history The rebase rule is placed before the auto-merge rule to ensure PRs are up-to-date before automatic merging occurs. Signed-off-by: Lalatendu Mohanty --- .mergify.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.mergify.yml b/.mergify.yml index 66bbd25e..8069f419 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -1,4 +1,12 @@ pull_request_rules: + - name: Automatic rebase to keep PRs up-to-date + conditions: + - "-draft" + - "-conflict" + - "-closed" + - "#approved-reviews-by>=1" + actions: + update: - name: Add CI label conditions: - or: