From Bulldozer to Mergify: How to Take Full Control of Your Pull Request Merges

If you've been using Bulldozer to automate pull requests (or thinking about it), you might have experienced some limitations that, while functional, don’t fully empower you as a developer or project maintainer. Bulldozer, an open-source tool for auto-merging PRs once conditions are met, provides some baseline capabilities for managing merges. But is that really enough for modern development workflows?

In this post, we’ll explore why Mergify is a superior alternative that can help you take full control of your pull requests, bringing more power, efficiency, and customization to your merging process.

Pain Points of Bulldozer

Bulldozer has been a go-to for automating pull request merges, especially when dealing with conditions like successful status checks and reviewer approvals. However, as teams grow and development workflows get more complex, Bulldozer reveals some inherent pain points:

  1. Limited Configuration Flexibility: Bulldozer requires managing a .bulldozer.yml configuration, which, while straightforward, lacks the nuanced flexibility many projects need. Any deviation from standard use cases tends to be cumbersome, requiring more manual adjustments or workarounds.
  2. Inefficient Pull Request Updates: One of Bulldozer’s major inefficiencies lies in how it handles keeping pull requests up-to-date with the target branch. Bulldozer’s approach is to continuously rebase or merge in changes, which can create constant updates that place unnecessary pressure on CI/CD systems. This process consumes resources, causes delays, and can even lead to unexpected merge conflicts at the worst possible moments.
  3. Static Merging Rules: With Bulldozer, merges are defined rigidly, with little room for customization beyond predefined methods. The tooling falls short if you must adapt your merging strategy depending on different conditions. In today’s development environment, workflows need dynamic, evolving rules that support different situations seamlessly.

These challenges leave developers spending more time managing tooling rather than focusing on code quality and innovation. So, what can Mergify bring to the table that Bulldozer can't?

Mergify: An All-in-One Solution for Modern Development

Mergify takes the principles behind Bulldozer’s automation and enhances them into a more dynamic, user-friendly, and powerful experience. Here’s why moving to Mergify is a game-changer:

  1. Merge Queue for Optimal Efficiency
    One of the standout features of Mergify is the merge queue. Unlike Bulldozer’s strategy of individually rebasing PRs whenever a target branch updates, Mergify’s merge queue optimizes the merging process by automatically stacking pull requests in order and testing them sequentially before merging. This means fewer CI runs, no overwhelming builds, and a faster, more reliable merging process. If you’re tired of your CI system grinding to a halt because of multiple Bulldozer-triggered updates, the merge queue feature in Mergify will feel like a breath of fresh air. The best part? Adding the merge queue is as simple as making a one-line configuration change—giving you more efficiency without adding complexity.
  2. Flexible Rule System and Merge Templates
    With Mergify, configuring merge actions is incredibly flexible. Instead of manually updating configurations through .yml files, Mergify provides a robust rule engine that allows you to set conditions effortlessly, giving you full control over when and how merges occur. Moreover, Mergify supports merge templates, which let you craft custom-commit messages for merged pull requests. This level of customization ensures consistency and clarity in your commit history. For example, you can configure templates to automatically add details like pull request titles, authors, and key issue references, making your Git history informative and easy to navigate—something Bulldozer’s static configurations just can't match.
  3. Seamless Migration and Simplicity
    Migrating from Bulldozer to Mergify is straightforward, and most of your existing automation configurations can be replicated or simplified in Mergify’s syntax. Mergify’s interface also makes it easier for teams to manage these configurations centrally rather than having developers edit configuration files manually across multiple repositories.
  4. More Advanced Features at Your Fingertips
    Bulldozer’s event-driven model handles basic auto-merging effectively, but Mergify goes beyond by adding advanced features like dependency management (holding a merge until dependent pull requests are merged) and prioritization (enforcing rules that decide which pull requests get merged first). These features make optimizing your workflows based on your team’s needs possible, something especially valuable for fast-paced, multi-contributor projects.

A One-Line Change to Start Using the Merge Queue

If your current pain point with Bulldozer is the constant rebasing that’s hammering your CI resources, you’ll love the merge queue in Mergify. Integrating it into your project takes as little as adding one extra line of configuration. Here's a simple example:

pull_request_rules:
  - name: auto-merge
    conditions:
      - check-success = my-ci-job
      - label = ready-to-merge
    actions:
      queue:

This single change shifts your project from a reactive merge model to an optimized queue-based system, reducing build times and ensuring a streamlined process.

Mergify vs. Bulldozer: Feature Comparison

To help you understand how Mergify can replace Bulldozer while providing more capabilities, here’s a quick summary of some key advantages:

Feature Bulldozer Mergify
Pull Request Auto-Merge Yes Yes
Merge Queue No Yes (one-line config)
Branch Updates Rebase or Merge on Updates Managed Queue (optimized for CI)
Merge Templates No Yes (custom commit messages)
Condition Flexibility Limited Trigger/Ignore Rules Comprehensive Rule Engine
Dependency Management No Yes

Conclusion

Bulldozer has served many well for simple automation needs, but as your project grows, the cracks begin to show. Mergify takes all the best aspects of Bulldozer and improves upon them, offering more efficient automation and a powerful set of tools to customize your merging workflow to meet your exact needs.

If you’re ready to leave behind the inefficiencies of Bulldozer, now’s the time to give Mergify a try. With an easy migration path, advanced features like merge queues and templates, and a focus on efficiency, Mergify can empower your team to focus on what matters: building great software, not managing pull request logistics.