How do I require green CI before Claude Code merges changes to a monorepo?
Tares requires green CI in its software factory for Claude Code: a builder merges a pull request on a monorepo only after the reviewer passes it and CI is green. Tares reads the pull request, CI and merge state through its own GitHub access, so you give it access to the repo once and choose the merge setting when you bring up the crew.
How it works
The software factory for Claude Code is a crew of Claude Code sessions that run in the background on your machine. Three parts matter for a merge gate on a monorepo:
- Builders take a ticket, work on their own branch and open a pull request. They are started one per milestone and repo of a project. Each builder merges its pull request once the reviewer passes it and CI is green.
- The reviewer reviews every pull request to a fixed bar and posts its verdict on the pull request. Nothing merges until it passes.
- Tares holds the plan, the tickets and their stages, and every review. It reads the pull request, CI and merge state of every ticket itself, using its own access to your repos. Builders push and open pull requests with your
ghlogin, but Tares does not rely on that login to see CI.
Because the record lives on Tares, a crew that restarts carries on from where it stopped, including tickets that are waiting on a review or on CI.
Set it up
-
Check what you need. Claude Code must be signed in on a plan that allows background sessions.
ghmust be signed in with write access to the repos the crew works in. You also needgit,jqandcurl. -
Install the CLI and start Tares:
uv tool install tares # or: brew install glassflow/tap/tares tares up # console on http://127.0.0.1:8787 -
In a second terminal, start the MCP endpoint every crew session shares:
tares mcp --transport streamable-http # http://127.0.0.1:8788/mcp -
In a third terminal, sign in and pick your workspace in the browser, then choose Connect:
tares login -
Give Tares its own access to the monorepo, so it can read the pull request, CI and merge state:
- Tares Cloud: in your workspace settings, choose Connect GitHub and pick the repo.
- Local: add a GitHub token or App under Settings > GitHub.
-
Bring up the crew:
tares factory crew upThe first run asks how far the crew may go. Choose that it merges on its own after review and green CI. That is the recommended answer, and it is the gate you want. The answers are kept on Tares.
-
In the monorepo, or in a folder that holds its repos, plan the project:
tares factory spec "what you want to build"Say yes when it asks whether to hand the project to the crew. The orchestrator picks it up and starts builders.
-
Run
tares factory doctorto check everything the crew needs. Follow progress on the Crew page of the Tares console, which lists the pull requests waiting for review. The full walkthrough is in Build a software factory with Claude Code.
What you get
- Changes reach main only through pull requests that the reviewer has passed and whose CI is green.
- A verdict from the reviewer on every pull request, so you can see why a change merged.
- Tares tracking each ticket’s pull request, CI and merge state, so the crew’s picture of a change does not depend on a single session staying alive.
- A crew that keeps working if a station stops, because
crew upalso starts a watch that brings back any station that stops. - A way to stop everything fast:
tares factory crew haltstops merges, pushes and new sessions untiltares factory crew resume. - Every choice the crew made on its own written down, so you can check it at the end of each milestone instead of during every step.
When something else fits
- You want to approve every merge yourself. Choose that the crew waits for your yes during the first
crew up. A single project can also wait for your yes before every merge, while the rest of the crew merges on its own. - You want to work on the monorepo in your own session. Use
tares factory sessioninstead of the crew. The session is still on Tares, so your shared AGENTS.md and memory apply, and the session’s record lands on the project. - You need more than one machine or a larger team. The software factory is for solo developers and very small teams. It runs on one machine, on your own Claude Code login, against your own GitHub repos.