Hanzo
OpenapiGit

Merges an open pull request by FAST-FORWARDING base to head, and answers the…

Merges an open pull request by FAST-FORWARDING base to head, and answers the proposal in its merged state with the revision base now points at.

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

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

Merges an open pull request by FAST-FORWARDING base to head, and answers the proposal in its merged state with the revision base now points at.

It merges only when base is already an ancestor of head — the case where head contains every commit base has, so moving the branch loses nothing and invents nothing. When base has moved on independently, this REFUSES with 409 and says so: a real three-way merge is not implemented here, and reporting one would claim a result these bytes do not produce. Rebase head onto base and merge again.

The move is judged by the same ref policy a git push of it would face, and fires the same build and notify reactions, so merging is not a way around either. Merging an already-merged proposal is a 409.

Request

2 fields.

FieldInTypeRequiredDescription
namepathstringyesName is the repo, from the :name path segment.
numberpathintegeryesNumber is the proposal's per-repo number, from the :number path segment.

Response

StatusBodyMeaning
200pullViewok

200 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 merge <name> 1

Git API · All Hanzo APIs · Interactive reference

How is this guide?

On this page