Skip to content

Commit 365a92c

Browse files
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 <lmohanty@redhat.com>
1 parent a8c621d commit 365a92c

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

.mergify.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
11
pull_request_rules:
2+
- name: Automatic rebase to keep PRs up-to-date
3+
conditions:
4+
- "-draft"
5+
- "-conflict"
6+
- "-closed"
7+
- "#approved-reviews-by>=1"
8+
actions:
9+
update:
10+
method: rebase
211
- name: Add CI label
312
conditions:
413
- or:

0 commit comments

Comments
 (0)