The other day I successfully set up Renovate (automated dependency update application) for my Hugo modules and modular sites. But I soon realized that manually merging these PRs was very tedious. So I started looking for a way to automatically merge PRs.
What’s wrong with Renovate’s built-in Auto Merge?
The first thing that came to mind was Renovate’s own auto-merge feature, but it takes a long time to merge a PR, which is not what I was expecting.
Mergify
So I started looking for alternatives from GitHub marketplace, and give the most popular one - Mergify a shot, it works great up to now.
Mergify Configuration
Put the .mergify.yml
file on the repo root.
1pull_request_rules:
2 - name: automatic merge for Renovate pull requests
3 conditions:
4 - author=renovate[bot]
5 - check-success=build
6 actions:
7 merge:
8 method: rebase
check-success=build
:build
is the GitHub action’s job name, not workflow name.method: rebase
: see https://docs.mergify.com/actions/merge/.
Read more on Mergify Docs.