MergeRamp / Guides / Field Guide 08

What will a merge queue do to your CI bill?

A queue can run checks again before merging. Your team may already be paying for repeated runs. Here’s how to compare the two.

Your PR has passed CI. Before you merge, another change lands on main. Your branch needs updating, so the same checks run again. Later that afternoon, it happens to another PR.

A merge queue sounds like a way to stop taking turns by hand. Then you read that it can run checks after a PR enters the queue. If CI already feels expensive, paying for another round deserves a closer look.

Start with the runs your team already does. Some validate new code. Some repeat because the base branch moved. Others retry a failed job. A queue changes that mix, and the effect on your bill depends on which runs it adds and which it replaces.

A merge queue can increase or reduce CI usage. Compare PR checks, queue validation, branch-update runs and retries over the same workload. Count the runner time actually consumed, then apply your billing terms. A queue can still be useful when its main benefit is fewer interruptions rather than cheaper CI.

Why a green PR might run CI again

GitHub’s native queue tests a temporary merge group containing the latest base and the changes ahead of the PR. Required Actions workflows need the merge_group trigger in addition to their PR trigger. Those are separate validation events. GitHub explains how queue validation works.

That explains the concern in GitHub’s “running checks twice” discussion. It does not establish that every queue doubles every repository’s checks. Different implementations update PR branches or validate temporary groups, and the existing workflow may already run several times before a merge.

The “lost the merge race” discussion describes the other side: someone merges first, and a developer has to update and test again. It is a familiar question to investigate in your history, rather than a measured baseline for your team.

Ten minutes waiting can mean twenty minutes of compute

Suppose a workflow runs two jobs in parallel, each for ten minutes. It finishes in about ten minutes but consumes twenty runner-minutes. Use elapsed time to estimate how quickly a queue can merge. Use the sum of job execution time to estimate compute cost.

For GitHub-hosted runners, round each job’s duration up to a whole minute and use the rate for that runner type. Different operating systems and runner sizes have different rates. Check GitHub’s current runner rates.

Gross runner cost = sum of each job’s billable minutes × that job’s per-minute rate.

Include failed jobs, rerun attempts and the time consumed before cancellation. A cancelled run that already used a runner belongs in the calculation.

Keep these four buckets separate so a run is counted only once:

  1. PR validation: initial checks and checks after code or review changes.
  2. Branch updates: validation triggered by catching a PR up with its base.
  3. Queue validation: checks on queue candidates, if the implementation creates a separate validation stage.
  4. Retries and discarded work: additional attempts after failures or queue changes, including work consumed before cancellation.

If the queue updates a PR branch and that triggers the usual checks, count that execution under branch updates. Do not count it again as a separate queue run. If a failure causes a replacement merge group, count the replacement under retries.

Gross compute cost and the amount charged can differ. GitHub includes some usage with its plans, and standard hosted runners in public repositories are free. Larger runners in public repositories are billed. Self-hosted compute still has infrastructure costs. Storage and other CI services need their own lines in your estimate. See GitHub’s billing rules.

Compare the same 100 PRs

This is an illustrative period in which 100 PRs merge. Assume each full validation uses two parallel jobs of eight minutes each: 16 runner-minutes per execution. Each PR has two development-stage validations on average. Keep those 200 executions unchanged in both cases.

For the queue scenario, assume one separate validation per merged PR, ten remaining branch-update executions, and thirty retry attempts. Each retry consumes eight runner-minutes in total. These are inputs to test against your repository, not expected results from adopting a queue.

All values are runner-minutes. The same jobs and runner types are used throughout. Scroll horizontally on smaller screens.
Work in the periodBefore: frequent updatesWith the example queueBefore: few updates
PR validation200 × 16 = 3,200200 × 16 = 3,200200 × 16 = 3,200
Branch updates150 × 16 = 2,40010 × 16 = 16020 × 16 = 320
Separate queue validation0100 × 16 = 1,6000
Retries and discarded work20 × 8 = 16030 × 8 = 24020 × 8 = 160
Total5,7605,2003,680

Against the busy-branch baseline, the example queue uses 560 fewer runner-minutes. It removes 2,240 minutes of branch-update work while adding 1,600 minutes of queue validation and 80 minutes of retries.

Against the low-overlap baseline, that same queue scenario uses 1,520 more runner-minutes. There was much less repeated work to replace. This is why the baseline matters.

At a deliberately hypothetical flat rate of $0.01 per runner-minute, the three totals would be $57.60, $52.00 and $36.80, before included usage or discounts. That rate is an arithmetic example, not a GitHub price quote. Replace it with the rates for your actual jobs.

This comparison excludes storage, deployment jobs, queue subscriptions and developer time. It assumes the same 100 PRs merge in every scenario. If your queue changes deployment frequency or throughput, include those differences rather than comparing only the most convenient part of the bill.

Use the history you already have

Start with your CI provider’s usage export and recent workflow history. Match executions to PRs and commits, then inspect the trigger and the jobs that ran. A repeated run on the same PR might follow a code fix, a flaky test or a branch update; the count alone does not tell you which.

For a useful before-and-after comparison, choose periods with similar PR volume and runner types. Show total usage alongside runner-minutes per merged PR. Keep runs for still-open or abandoned PRs in the period total, and flag any large change in that mix.

  • Check the expensive jobs. A short Linux job and a long macOS matrix should not be priced as interchangeable runs.
  • Keep unsuccessful work visible. Measure failures, cancellations and replacements, not just the final green execution.
  • Check what actually gets batched. GitHub says its merge limits do not combine merge_group builds. A group of PRs merged together is not automatically one CI execution. Read the merge-limit distinction.
  • Inspect queue changes. GitHub documents rebuilt candidates after failures and full rebuilds of in-progress PRs when a PR jumps to the front. Include that consumed work in your estimate. See the failure and priority examples.

If AI coding agents increase your PR volume, repeat the calculation with that higher volume. More changes can mean more validation and more overlap, even with the same headcount. Keep the increase as an explicit scenario; generated code is not a reliable measure of how many PRs will pass review and merge.

Before cutting jobs to save minutes, check that the required validation still covers the code that will land. Review workflow triggers and duplicate executions first. A passing check for an older combination of changes does not validate a new one.

Decide what you want the queue to take off your hands

A lower runner bill is one possible outcome. Another is that developers stop returning to approved PRs to update branches and negotiate whose merge goes next. Keep those benefits separate: ten unattended minutes of CI are not ten minutes of developer work.

MergeRamp coordinates a serial workflow. In strict mode, it updates the selected PR when it is behind, waits for required checks on the current commit, and passes its merge check so GitHub can merge under your rules. See the PR lifecycle and queue modes. Your workflow configuration determines the CI work those branch updates trigger.

Check whether that workflow can handle your busiest hour with the serial queue capacity guide. Then use the interruption calculator to estimate the coordination time your team spends today. Keep its assumptions visible; the result is not measured time saved.

Add the queue subscription cost to your CI comparison. If the bill rises but the team spends less time chasing merges, you can decide whether that tradeoff is worth it with both numbers in view.

Try MergeRamp with your team