Hanzo
OpenapiGit

Proposes a branch for merging and returns it with its number.

Proposes a branch for merging and returns it with its number. Answers 201.

POST /v1/git/repos/{name}/pulls

Addresshttps://api.hanzo.ai/v1/git/repos/{name}/pulls
MethodPOST
Operationpost_git_repos_by_name_pulls
AuthAuthorization: Bearer $HANZO_API_KEY

Proposes a branch for merging and returns it with its number. Answers 201. Both branches must already exist — a proposal naming a branch nobody pushed is a typo, not a plan — and base defaults to the repo's default branch.

Proposing the same head into the same base twice is a 409 while the first proposal is still open, so a retried agent run leaves ONE thing to review rather than a pile of identical ones. A repo outside the caller's scope is a 404, exactly as reading it is.

Request

6 fields, body application/json (required).

FieldInTypeRequiredDescription
namepathstringyesName is the repo the proposal belongs to, from the :name path segment.
basebodystringBase is the branch the work is proposed INTO, by short name.
bodybodystringBody is the longer description.
headbodystringHead is the branch holding the work, by short name (agent/fix-503).
namebodystringName is the repo the proposal belongs to, from the :name path segment.
titlebodystringTitle is the one-line summary of what is being proposed.

Response

StatusBodyMeaning
201pullViewcreated

201 body — 11 fields.

FieldInTypeAlwaysDescription
authorbodystringAuthor is the user who opened it; empty for a caller with no user.
basebodystringBase is the branch the work is proposed into.
bodybodystringBody is the longer description; empty when none was given.
createdAtbodystringCreatedAt is RFC 3339 UTC.
headbodystringHead is the branch holding the work.
mergedRevbodystringMergedRev is what base points at now that the merge landed.
numberbodyintegerNumber is the proposal's per-repo handle, dense from 1.
repobodystringRepo is the repository the proposal belongs to.
statebodystringState is "open" or "merged".
titlebodystringTitle is the one-line summary.
updatedAtbodystringUpdatedAt is RFC 3339 UTC.

Failure carries the platform error shape — see Errors.

Examples

hanzo git repos pulls create <name>

Git API · All Hanzo APIs · Interactive reference

How is this guide?

On this page