Lesstep
Bitbucket Cloud and Data Center · Merging pull requests · October 27, 2026

Bitbucket merge queues: Add to Merge Queue, setting one up, and the REST API

On a branch with a merge queue, a pull request is not merged directly: it goes into the queue, Bitbucket builds what the target branch would become with it, and merges it only when that build passes. Bitbucket Cloud has merge queues on its paid plans; Bitbucket Data Center has them from 10.2. From Atlassian's Manage pull requests with merge queues (Cloud), the Cloud REST reference and the Data Center 10.2 and 10.3 release notes.

Cloud: before you start

Cloud: create and activate a queue

  1. In the repository, select More actions (…) next to its name in the left sidebar, then Settings, Workflow, Merge queues, and Create a merge queue.
  2. Give it a Name (it must match the key under merge-queues in bitbucket-pipelines.yml), the Target branch (the pull requests' destination branch), the Build concurrency (how many queue builds may run at once) and the Merge strategy (Merge commit, Squash or Rebase + merge), then Save. A new queue is INACTIVE.
  3. In bitbucket-pipelines.yml on the target branch, add a merge-queues section beside pull-requests, with the queue's name as its key, for example merge-queues: / mergequeue-main: / - step:. Dynamic pipelines support it too.
  4. From the … menu of the queue, select Activate. Pull requests to that branch then show Add to Merge Queue instead of Merge once their merge checks pass.

Without a matching merge-queues section, pull requests to that branch can become impossible to merge and stay open, with a message that the merge queue requirements are not met.

Cloud: what happens in the queue

Cloud: managing a queue

On the Merge queues page, the … menu at the top right offers Drain (stop taking pull requests; those in the queue carry on), Clear (only when draining or inactive: remove every pull request, stop the builds, and leave the pull requests open), Deactivate (remove the queued pull requests; the branch merges normally again), Activate, and Delete (only when inactive or drained and empty). The same page lists the queued pull requests of each queue.

Cloud: the REST API

Data Center

Merge queues came to Bitbucket Data Center in 10.2, the Long Term Support release of March 3, 2026. 10.3 (May 12, 2026) added webhook events for merge queues (for example when a merge result is being prepared or a queue branch is cleaned up), and a cascading merge whose next pull request targets a branch with a merge queue now adds that pull request to the queue instead of stopping for someone to queue it by hand.

Merge queues in IntelliJ IDEA

Pull Request Inbox for Bitbucket, a plugin by Lesstep for JetBrains IDEs 2024.1 or later, lists the pull requests of Bitbucket Cloud and Bitbucket Data Center in an IDE tool window with their merge checks, the merge queue among them. From version 1.0.49, on Bitbucket Cloud, its Merge on a branch with a merge queue adds the pull request to the queue, and the plugin says its place in the queue instead of waiting for the merge; refresh later to see it merged. From 1.0.50, its merge queue line says whether merging goes through the queue, whether the pull request is in it and the queue is paused, or that the queue is not taking pull requests now. The review inbox and the merge checks are free; approving, commenting and merging are Pro, with a 30-day trial.

Get it on JetBrains Marketplace

Bitbucket is a trademark of Atlassian Pty Ltd; IntelliJ IDEA is a trademark of JetBrains s.r.o. This page is not affiliated with or endorsed by Atlassian or JetBrains.

More: Bitbucket auto-merge · Bitbucket merge checks · Bitbucket merge strategies · pull request builds · Bitbucket pull request plugins for IntelliJ IDEA, compared · 日本語