Cabal
How Haskell's Cabal Project Keeps Pull Requests Moving Through a Two-Approval Gate
Artem Pelenitsyn
Cabal contributor
Company
Cabal is the package manager and build system for Haskell, the tool every Haskell developer uses to build software and pull dependencies from Hackage. The project has been alive for roughly 15 years and is maintained today by a small group inside the broader Haskell ecosystem.
Challenges
- • Two-approval rule on every merge meant PRs often sat waiting even after they were ready to land
- • Multiple active release branches needed parallel maintenance and backports without manual cherry-picking
- • Open approval policy created a steady flow of contributions but only a small group of people could actually merge
Solutions
Cabal is the package manager and build system for Haskell. Every developer who writes Haskell uses it to build code and pull dependencies from Hackage. The project has been alive for more than 20 years, and is maintained today by a small group with merge access plus a wider pool of contributors with approval rights.
Cabal's policy is intentionally generous on approvals. Anyone who has contributed meaningfully gets approval access, which keeps the project from depending on a single bus-factor maintainer. The trade-off is that two approvals are required before a merge can happen, and merge access stays with the small core. That combination produces a steady pipeline of contributions, but it also creates a real risk of "approved but not yet merged" PRs quietly piling up.
Start small. You can get a lot of benefits even if you start with very basic configuration. And then see what you want to be improved and search for the documentation.
![]()
Artem Pelenitsyn
Cabal contributor
Cabal's setup runs on labels and commands. When a PR has two approvals and CI is green, a maintainer applies a label saying either "merge to master" or "squash and merge". From there, Mergify takes over: it waits out a custom cool-down period (so any last-second concerns can land), then merges using the requested strategy.
The team also uses Mergify's command syntax for the day-to-day operations a maintainer would otherwise do by hand:
@mergify rebaseto bring a stale PR up to date with master without anyone running git locally.@mergify backportto push a fix to the active release branches once it's been merged to master.
Across the past 12 months, the cabal repo alone has merged more than 250 PRs through Mergify, with another 100+ across the broader haskell organization (haskell-language-server and the smaller language tooling around Hackage). All of that came from 62 distinct authors, well beyond what a small merge team could process by hand.
The bigger story for a project like Cabal is what doesn't happen. Approved PRs don't sit waiting for a maintainer to remember they exist, and the contributors who only ship once or twice a year don't bounce off because their PR went stale before anyone merged it. For an open source project that depends on outside contributions, that last point is the one that matters most.
Other customer stories
Engineering teams we helped merge faster, safer, and cheaper
Move faster. Break less.
2k+ organizations use Mergify to merge 75k+ pull requests a month without breaking main.