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)
| Name | Type | Description |
|---|---|---|
pullRequestURL | string | The pull request to check, as on your Git host. |
commitSHA | string | Or the commit to check. |
requiredWorkflows | string[] | 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". |
blockOnTestFailure | boolean | Failing tests block. Default: true. |
minCoveragePct | number | Coverage floor: the latest test run that reported coverage must meet it. Omitted, coverage isn't gated. |
disallowedLicenses | string[] | License ids that must not appear in the project's latest SBOM (exact, case-insensitive). A project with no SBOM fails the check. |
requireDeployedTo | string | An environment the change must already have a succeeded deployment in (for example staging). |
lookbackMs | integer | How far back to look (14 days by default). Default: 1209600000. |
blockOnInFlight | boolean | Deny 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
| Name | Type | Description |
|---|---|---|
pullRequestURL | string | |
commitSHA | string | |
requiredWorkflows | string | Comma-separated. |
disallowedLicenses | string | Comma-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.