Docs
Search docs

Cancel the GitHub attach in flight

DELETE/api/repos/{owner}/{repo}/github-attach

cancelGithubAttach

Cancels the attach in flight. Before the worker froze the relationship this only ends the run; after, the relationship is put back exactly as it was first. Once the attach is `publishing` or `applying` it can no longer be cancelled: `409 relationship_conflict`. `404` when no attach is in flight. Requires repository **admin** from a **signed-in session** or an access token with no workspace or repository lock (ADR 0162); a locked token is refused with `403 forbidden`.

Requires authentication using a bearer token or a session cookie — see tokens and scopes.

curl

curl -X DELETE 'https://neosource.dev/api/repos/OWNER/REPO/github-attach' \
  -H 'Authorization: Bearer $NEOSOURCE_TOKEN'

fetch

fetch("https://neosource.dev/api/repos/OWNER/REPO/github-attach", {
  method: "DELETE",
  headers: {
    Authorization: "Bearer $NEOSOURCE_TOKEN",
  },
});

Path parameters

ownerrequired

Repository owner or organization slug.

string

reporequired

Repository name.

string

Responses

204Cancelled

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: attach_publish_unconfirmed, conflict, relationship_conflict, relationship_unavailable
  • 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