Ticket to PR
A written request becomes a tested change, ready for review.
Ticket to PR takes a coding task from request to delivery in six stages, each with a defined owner: ticket, plan, patch, run, proposal and delivery. AI suggests the plan and writes the diff. The platform validates every output before anything runs. The isolated executor applies the patch and runs the repository's own tests. Two different people decide: one on the plan, another on the final proposal.
The output is either a patch for git apply, with a verifiable hash, or a draft pull request on a new branch created on top of the tested commit. Merging always stays with your team.
How it works
- A ticket carries a title, description, acceptance criteria, workspace repository, base branch, execution image (node22, python312 or go126), an optional setup command and a test command. Besides the UI and the API, other products open tickets with the request ready: the .spec.ts of an accepted test in Test Automation, the removal of a stale flag in Feature Management and the fix for an IaC drift detected by Software Delivery.
- The plan is JSON with up to 12 files (modify, add or delete), steps, tests and risks. Every path is checked against the repository tree. The plan records a sha256 and waits for a person to approve it, with a justification and the hash they saw.
- The diff is validated before it runs: up to 24 KB and 20 files, plan files only, no .github/workflows, .env, keys, credentials or .git, no secrets in new lines, no binaries, renames, symlinks or mode changes, and it must apply cleanly on the base read from GitHub.
- Execution in the isolated executor: shallow clone, git apply, capture of the final diff before the repository commands run, and tests running without any token. The result comes back signed, with a secret derived only for that run.
- The proposal carries a hash, evidence and history in the agent catalog, plus security facts extracted from the diff (secrets, disabled TLS, eval, shell, concatenated SQL, weak hashes, open CORS). Whoever requested the patch does not decide on the proposal.
- Bounded loop per ticket: 3 iterations by default (5 at most), an AI budget per ticket, one iteration at a time and one patch per plan. A new plan receives the reason the previous one failed.
POST /api/platform/code-automation/tickets
POST /api/platform/code-automation/tickets/<id>/plan
POST /api/platform/code-automation/plans/<id>/decision {decision, reason, sha256}
POST /api/platform/code-automation/tickets/<id>/patch
GET /api/platform/code-automation/runs/<id>/patch (diff, x-aiuby-sha256 header)
POST /api/platform/agent-catalog/proposals/<id>/decision
POST /api/platform/code-automation/runs/<id>/pull-request
GET /api/v1/code-automation/tickets (key with engineering:read)What it does not do
- It does not take tickets from GitHub Issues or Jira: input comes from the UI, the session API or another AIUBY product.
- It does not merge, force-push or reuse branches. The draft PR requires PR creation to be turned on and the workspace write credential; without them, the delivery is the patch.
- It does not do semantic code search: the plan reads the tree, the README and the manifest, and the model receives whole files, within size caps. Large repositories may call for smaller tickets.
- The test is the repository's declared command, with no JUnit report or coverage. Security facts come from fixed rules on the diff, not from the executor scanners. The PR writes files with mode 100644, so a changed executable script loses its execute bit.