How do I require green CI before Claude Code merges changes to a Python backend?
Tares requires green CI before Claude Code merges: a builder merges its pull request only after the reviewer passes it and CI is green. Tares reads the pull request, CI and merge state of every ticket through its own GitHub access. You choose when you first bring up the crew whether it merges on its own after review and green CI, which is the recommended setting, or waits for your yes.
How it works
The software factory for Claude Code is a crew of Claude Code sessions that run in the background on your machine. For a Python backend, the part that matters is how a change reaches main:
- A builder takes a ticket, works on its own branch and opens a pull request.
- The reviewer reviews every pull request to a fixed bar and posts its verdict on the pull request.
- The builder merges the pull request only once the reviewer has passed it and CI is green.
- Builders push and open pull requests with your
ghlogin. Tares reads the pull request, CI and merge state of every ticket itself, so it needs its own access to the repos.
Tares keeps the plan, the tickets and their stages, and every review. If a session restarts, the record stays on Tares and the crew carries on where it stopped.
You can also hold a single project back further. One project can wait for your yes before every merge, even when the rest of the crew merges on its own. See Get started for the full picture of the crew.
Set it up
-
Check what you need: Claude Code signed in on a plan that allows background sessions,
ghsigned in with write access to the repo your Python backend lives in, plusgit,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. Stations reach Tares only through it:
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 GitHub access, so it can read the pull request, CI and merge state:
- Tares Cloud: in your workspace settings, choose Connect GitHub and pick the repos.
- 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, or that it waits for your yes. You also set whether it releases, whether a second model checks every commit, and how many builders run at once. The answers are kept on Tares.
-
Plan the work in the repo for your Python backend:
tares factory spec "what you want to build"This opens Claude Code with
/tares:spec. It interviews you, writes the spec, milestones with acceptance checks and tickets into a Tares project, and asks whether to hand the project to the crew. Say yes and the orchestrator picks it up. -
Run
tares factory doctorat any point to check everything the crew needs.
What you get
- Changes reach main through a pull request that the reviewer has passed and whose CI is green. Builders do not merge before that.
- Every review is posted on the pull request and recorded on Tares.
- You decide the merge policy once at setup: the crew merges after review and green CI, or it waits for your yes.
- You can make one project wait for your yes before every merge while the rest of the crew merges on its own.
- Tares tracks each ticket’s pull request, CI and merge state, and the Crew page shows each open project, its builders and the pull requests waiting for review.
- Questions that need you reach you in the orchestrator’s session. Open it with
tares factory crew attach orchestrator. - If you need to stop everything,
tares factory crew halt "<reason>"stops merges, pushes and new sessions untilcrew resume.
When something else fits
- If you want to work on one project yourself rather than with a crew, run
tares factory sessionin your own Claude Code session, still on Tares. - If you want a person to approve every merge, choose the wait-for-your-yes setting for the crew or for a single project instead of the automatic merge.
Related
- Build a software factory with Claude Code
- How do I require green CI before Claude Code merges changes to a Node/TypeScript app?
- How do I require green CI before Claude Code merges changes to a monorepo?
- How do I have a second model review bug fixes in a Python backend before each commit?
Still stuck? Get help