AI CodeOps

Check whether a pull request or commit may ship

Check whether a pull request or commit may ship. Applies the release gate across every session that touched the change: tests, findings, approvals, and the…

POST /api/release/check

Check whether a pull request or commit may ship

Applies the release gate across every session that touched the change: tests, findings, approvals, and the optional coverage, license and promotion checks.

Authentication: a workspace API key as Authorization: Bearer <key>, or a signed-in console session.

Request body (JSON)

NameTypeDescription
pullRequestURLstringThe pull request to check, as on your Git host.
commitSHAstringOr the commit to check.
requiredWorkflowsstring[]Workflow ids that must have run and completed for a pass.
blockingSeverity"critical" | "high" | "medium" | "low" | "info"Open findings at or above this severity block. Default: "high".
blockOnTestFailurebooleanFailing tests block. Default: true.
minCoveragePctnumberCoverage floor: the latest test run that reported coverage must meet it. Omitted, coverage isn't gated.
disallowedLicensesstring[]License ids that must not appear in the project's latest SBOM (exact, case-insensitive). A project with no SBOM fails the check.
requireDeployedTostringAn environment the change must already have a succeeded deployment in (for example staging).
lookbackMsintegerHow far back to look (14 days by default). Default: 1209600000.
blockOnInFlightbooleanDeny while a considered session is still pending or running. Default: false.

Responses

  • 200: The verdict. allowed is true or false; a denial is still a 200.
  • 400: The payload didn't validate.
  • 401: No key or session, or the key isn't valid.
  • 403: The key belongs to another workspace, or lacks workspace:read.
  • 429: Too many checks for this workspace; retryAfterMs says when to try again.

GET /api/release/check

The same check, with query parameters

Accepts the same names as query parameters; lists are comma-separated.

Authentication: a workspace API key as Authorization: Bearer <key>, or a signed-in console session.

Query parameters

NameTypeDescription
pullRequestURLstring
commitSHAstring
requiredWorkflowsstringComma-separated.
disallowedLicensesstringComma-separated.

Responses

  • 200: The verdict.

Example

curl -sf -X POST "https://console.aicodeops.dev/api/release/check" \
  -H "Authorization: Bearer $AICODEOPS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"pullRequestURL": "https://github.com/acme/api/pull/42", "minCoveragePct": 80}'

The full spec: /docs/api/openapi.json (OpenAPI 3.1). More in the API guide.