Merge requests
Merge train and merge queue
7 min read
In a busy project, two approved merge requests can each pass the pipeline on their own and break
main together. The GitLab merge train (Premium) and the GitHub merge queue solve this: the
MRs join a queue, and the server tests each one together with the ones ahead of it before merging.
Versora shows the MR's position in the queue, adds and removes MRs and opens the panel with the
whole queue of the target branch.
- MR review › Actions tab › Merge train (GitLab) or Merge queue (GitHub) card.
- On the Merge card, when the MR is already in the queue, the position appears.
The card only appears with the MR open and when the queue applies:
- on GitLab, whenever the project doesn't have the merge train turned off. Someone who isn't a Maintainer can't see that setting; then the card appears with the note "GitLab doesn't say whether this project uses merge trains (it only shows that to Maintainers). If it doesn't, the server refuses the add.";
- on GitHub, when the target branch has a merge queue.
Without the feature on the server, the card appears disabled, with the reason (for example, "Merge trains are a GitLab Premium or higher feature." or "This server doesn't have merge trains.").
| Text | Meaning |
|---|---|
| "In the merge train: position 2 of 3" (and the state of the train pipeline) | The MR is in the queue. The position is read again every 30 seconds, while the window has focus. |
| "In the merge queue: position 2" | The same, on GitHub. |
| "Joins the merge train when the pipeline passes." | Auto-merge is scheduled; the MR joins when the MR's pipeline passes. |
| "Left the merge train on 05/12/2026, 14:10. GitLab wrote:" and the server's text | The train pipeline failed or the MR was removed. |
| "Not in the main merge train." / "Not in the main merge queue." | The MR isn't in the queue. |
- On the Actions tab, on the Merge train card, click Add to merge train. With the MR's pipeline still running, the button is Add when the pipeline passes.
- The Add !42 to the merge train? dialog explains: "!42 joins the end of the main merge train. GitLab runs a pipeline with the changes ahead of it; if it passes, it merges." With the pipeline running, it adds "The pipeline is still running: the merge request joins when it passes."
- Confirm. The bar shows "Adding to the merge train…".
- At the end you see "!42 joined the main merge train." or "!42 joins the merge train when the pipeline passes.".
On GitHub, the buttons are Add to merge queue and Add when checks pass, and the dialog says: "!42 joins the end of the main merge queue. GitHub tests the pull request with the ones ahead of it and merges it when its turn comes."
- Click Remove from merge train (or Remove from merge queue).
- The Remove !42 from the merge train? dialog explains: "The merge request leaves the merge train and auto-merge is canceled. The ones behind it rerun their pipelines without it." On GitHub: "The pull request leaves the merge queue. The ones behind it are tested again without it."
- Confirm. At the end: "!42 left the merge train.".
When the merge train pipeline fails, the MR leaves the queue. A merge train pipeline can't be retried: the button becomes Add back to merge train, and the Add !42 back to the merge train? dialog warns that "adding it back creates a new pipeline".
The panel shows all the MRs in a target branch's queue, in order.
- Merge train card › View the main merge train (or View the main merge queue).
- Palette (Ctrl+P): "View the merge train…" (on GitHub, "View the merge queue…"), with the detail "Target branch: main". The target is that of the current branch's MR; without an MR, the project's default branch.
- Target branch: changes the queue shown.
- On GitHub, "Queue merge method: …".
- Each row: the position, the number (click to Open the review in the app), the title and a summary with the MR's state in the queue, the state of the train pipeline, who added it ("by Ana"), how long ago and, when the server reports it, the estimate ("~3 min to merge" or "~1 h 05 min to merge").
- The × on each row ("Remove !43") removes the MR from the queue, with the same confirmation as the card.
- Recently completed (GitLab): the ones that already left the queue with a merge.
- In the footer, the "Choose an open merge request…" list and Add put another MR with the same target in the queue. With no candidates: "No other open merge request for this target".
- "Nothing in the main merge train right now." when the queue is empty.
The panel is read again every 15 seconds while it's open, with the window in focus. The refresh button reloads right away; Close or Esc close it.
| State | Meaning |
|---|---|
| waiting | In the queue, waiting for its turn. |
| pipeline up to date | The train pipeline includes the queue's current changes. |
| pipeline outdated | The queue changed and the pipeline will be rerun. |
| merging | The server is merging. |
| merged | The merge went in. |
| merged outside the train | The merge was done some other way. |
| queued / awaiting checks / ready to merge / can't be merged / locked | GitHub merge queue states. |
From GitLab 19.3 on, a project can require the merge train. In that case, clicking Merge on the Merge card is refused by the server with code 405. Versora doesn't just show the error: it opens the Merge of !42 refused dialog, which explains:
- with a mandatory train: "This project requires a merge train: GitLab only accepts the merge of !42 through the train. "Add to the merge train" resends the request with auto_merge=true; the merge request goes in when the train pipeline passes.";
- when the app can't confirm it: "GitLab refused the direct merge of !42 (405). If the project requires a merge train (GitLab 19.3+), the merge only goes through the train: … The refusal also happens if the merge request is a draft, has conflicts or was already merged.";
- and the "Details:" line with what the server answered.
The Add to the merge train button resends the request through the train. At the end: "!42 was added to the merge train." and the position. On GitHub, with a merge queue on the target, the dialog says "The target of !42 uses a merge queue: the direct merge is refused. Add the pull request to the merge queue." and offers Add to the merge queue. Without a merge queue, GitHub only shows the reason, with OK.
Nothing in the local repository. Everything goes through the server API: on GitLab, the merge
trains API (and the merge with auto_merge=true); on GitHub, the pull request's merge queue.
The queue lives on the server: Ctrl+Z doesn't take the MR out of it. Use Remove from merge train (or the × in the panel).
- "Your account can't see this project's merge train (it needs the Developer role or higher).": ask for access to the project.
- "Your account can't add this merge request to the merge train.": merge permission is missing.
- "This GitLab doesn't have the merge trains API (old version or feature turned off).": the card is disabled.
- "The source branch changed since it was last read. Refresh and try again.": someone pushed commits; refresh the review.
- "GitLab couldn't remove the merge request from the merge train." and "The merge request isn't in the merge train.": refresh the card; the queue may have moved.
- "The main branch doesn't have a merge queue.": on GitHub, the queue isn't turned on for that target.
- "GitHub refused: …" / "GitLab refused: …": the reason comes from the server.
Whether the project uses a merge train and whether it's mandatory are project settings on GitLab. The merge queue is a branch protection rule on GitHub. The app has no preference for this.
- Merging
- Merge scheduling (also applies to the merge train)
- Merging the stack up to here (uses the train when the project requires it)