Never break main again.
CIHub is the self-hosted merge queue for GitHub. It tests each pull request on top of everything that lands before it, and merges it only if the result still passes. With the CI you already have.
CIHub is the self-hosted merge queue for GitHub. It tests each pull request on top of everything that lands before it, and merges it only if the result still passes. With the CI you already have.
main.Two pull requests pass CI on their own. You merge both. main is red, and nobody knows why: each one was tested without the other.
Each pull request was green on an old main. Nobody tested the two together before they landed.
CIHub tests the exact commit that will land: main, the pull requests ahead, and this one. If it fails, nothing lands.
No rebase loop, no broken main, no "who merged that?". You do not create a queue: the first command creates it.
A pull request is approved and its checks are green.
Comment /cihub merge. CIHub tests it on top of everything ahead of it, alone or in a batch.
If that exact combination passes, CIHub merges it. If not, the pull request leaves the queue, with the reason on it.
What gets tested is exactly what lands. The required checks are read on the target branch, never from the pull request, so that a pull request cannot weaken its own gate.
CIHub pushes a test branch and waits for the required statuses and check runs. If it reports a check, CIHub waits for it.
One container and a Postgres. Your code stays on your infrastructure. One instance serves several GitHub organizations.
Each pull request says where it stands in the queue and what it waits for: on GitHub, in the dashboard, in the CLI.
Pull requests are tested in parallel or in batches. A failed batch is split to find the cause, and one flaky failure does not kick anyone out.
To change its behavior, add .cihub.yaml at the root of the repository. CIHub reads it on the head of the target branch, never from a pull request.
1# yaml-language-server: $schema=https://cihub.io/schema/config/v1.json 2version: 1 3queues: 4 - branch: main 5 strategy: batched 6 batching: 7 size: 3 8 max_wait_minutes: 1 9 queue_conditions: 10 draft: false 11 labels: 12 none: [do-not-merge] 13 checks: 14 success: [Build Success] 15priority_rules: 16 - name: renovate 17 conditions: 18 author: renovate[bot] 19 priority: low
An agent that helps you set up a queue finds on this site everything you find, in Markdown.
.md, or with Accept: text/markdown..cihub.yaml and the OpenAPI document of the API.A GitHub App, a Helm chart and a Postgres. Then comment /cihub merge.
mainIt waits for room in the window: 2 runs at a time now. It merges in about 33 min.See it in the queue →