Resolve an ambiguous GitHub ref transaction with provider proof
POST/api/repos/{owner}/{repo}/github-ref-transactions/{id}/resolve
resolveGithubRefTransaction
Settles a `github_managed` repository's `ambiguous` write-through transaction — one whose outcome on GitHub nobody could prove — as `projected`, `rejected` or `cancelled`. Requires repo admin. `observed_remote_refs` states the OID GitHub holds for EVERY ref the transaction names (`null` = absent), exactly those refs; it is verified against a live read of GitHub's refs before anything changes, and a mismatch answers `409 github_ref_proof_mismatch` with the row untouched. `projected` additionally requires GitHub to hold every recorded target (`409 conflict` otherwise — resolve as `cancelled` and the managed observation converges on what GitHub holds). `projected` projects the recorded targets as a provider observation (no native CI) when local refs still sit at the transaction's expected old values, records the current operation when they are already at the targets, and answers `409 conflict` when they moved. The verified proof, the resolving admin and the time are recorded; the transaction's staged objects are released once it is terminal. Only `ambiguous` transactions are resolved here (`409 conflict` otherwise).
Requires authentication using a bearer token or a session cookie — see tokens and scopes.
curl
curl -X POST 'https://neosource.dev/api/repos/OWNER/REPO/github-ref-transactions/ID/resolve' \
-H 'Authorization: Bearer $NEOSOURCE_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"resolution":"string","observed_remote_refs":[]}'fetch
fetch("https://neosource.dev/api/repos/OWNER/REPO/github-ref-transactions/ID/resolve", {
method: "POST",
headers: {
Authorization: "Bearer $NEOSOURCE_TOKEN",
"Content-Type": "application/json",
},
body: JSON.stringify({"resolution":"string","observed_remote_refs":[]}),
});Path parameters
ownerrequiredRepository owner or organization slug.
reporequiredRepository name.
idrequiredThe ref transaction id (a UUID), as a paused push or a band-2 notice names it.
Request bodyrequired
application/json
Responses
200Resolved
application/json
Standard errors
Bodies documented once for the whole API — see standard errors.
- 400Bad Request — one of: invalid_input
- 401Authentication required
- 403Forbidden — one of: forbidden
- 404Not Found — one of: not_found
- 409Conflict — one of: conflict, github_ref_proof_mismatch
- 423Locked — one of: busy
- 429Rate limited — retry after the `Retry-After` header
- 500Internal server error
- 502Bad Gateway — one of: upstream
- 503Service temporarily unavailable / at capacity — retry after the `Retry-After` header
- 504Gateway timeout — the request exceeded the server's handling budget