check_runs
Creates, updates, deletes, gets or lists a check_runs resource.
Overview
| Name | check_runs |
| Type | Resource |
| Id | vercel.checks.check_runs |
Fields
The following fields are returned by SELECT queries:
- list_for_check
- get
- list
| Name | Datatype | Description |
|---|
Check run backed by a project-level check definition.
| Name | Datatype | Description |
|---|---|---|
id | string | |
name | string | |
check_id | string | (wire: checkId) |
deployment_id | string | (wire: deploymentId) |
external_id | string | (wire: externalId) |
owner_id | string | (wire: ownerId) |
project_id | string | (wire: projectId) |
blocks | string | (build-start, deployment-alias, deployment-promotion, deployment-start, none) |
completed_at | number | (wire: completedAt) |
conclusion | string | (canceled, failed, neutral, skipped, succeeded, timeout) |
conclusion_text | string | (wire: conclusionText) |
created_at | number | (wire: createdAt) |
external_url | string | (wire: externalUrl) |
output | object | |
requires | string | (build-ready, deployment-url, none) |
source | | |
status | string | (completed, queued, running) |
targets | array | |
timeout | number | |
updated_at | number | (wire: updatedAt) |
| Name | Datatype | Description |
|---|
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_for_check | select | project_id_or_name, check_id | team_id, slug | List all runs associated with a given check. |
get | select | deployment_id, check_run_id | team_id, slug | Return a detailed response for a single check run. |
list | select | deployment_id | team_id, slug | List all check runs for a deployment. |
create | insert | deployment_id, check_id | team_id, slug | Creates a new check run for a deployment. |
update | update | deployment_id, check_run_id | team_id, slug | Update an existing check run for a deployment. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
check_id | string | The ID of the resource that will be updated. |
check_run_id | string | |
deployment_id | string | |
project_id_or_name | string | |
slug | string | The Team slug to perform the request on behalf of. |
team_id | string | The Team identifier to perform the request on behalf of. (wire: teamId) |
SELECT examples
- list_for_check
- get
- list
List all runs associated with a given check.
SELECT
*
FROM vercel.checks.check_runs
WHERE project_id_or_name = '{{ project_id_or_name }}' -- required
AND check_id = '{{ check_id }}' -- required
AND team_id = '{{ team_id }}'
AND slug = '{{ slug }}'
;
Return a detailed response for a single check run.
SELECT
id,
name,
check_id,
deployment_id,
external_id,
owner_id,
project_id,
blocks,
completed_at,
conclusion,
conclusion_text,
created_at,
external_url,
output,
requires,
source,
status,
targets,
timeout,
updated_at
FROM vercel.checks.check_runs
WHERE deployment_id = '{{ deployment_id }}' -- required
AND check_run_id = '{{ check_run_id }}' -- required
AND team_id = '{{ team_id }}'
AND slug = '{{ slug }}'
;
List all check runs for a deployment.
SELECT
*
FROM vercel.checks.check_runs
WHERE deployment_id = '{{ deployment_id }}' -- required
AND team_id = '{{ team_id }}'
AND slug = '{{ slug }}'
;
INSERT examples
- create
- Manifest
Creates a new check run for a deployment.
INSERT INTO vercel.checks.check_runs (
check_id,
deployment_id,
team_id,
slug
)
SELECT
'{{ check_id }}' /* required */,
'{{ deployment_id }}',
'{{ team_id }}',
'{{ slug }}'
RETURNING
id,
name,
check_id,
deployment_id,
external_id,
owner_id,
project_id,
blocks,
completed_at,
conclusion,
conclusion_text,
created_at,
external_url,
output,
requires,
source,
status,
targets,
timeout,
updated_at
;
# Description fields are for documentation purposes
- name: check_runs
props:
- name: deployment_id
value: "{{ deployment_id }}"
description: Required parameter for the check_runs resource.
- name: check_id
value: "{{ check_id }}"
- name: team_id
value: "{{ team_id }}"
description: The Team identifier to perform the request on behalf of.
description: The Team identifier to perform the request on behalf of.
- name: slug
value: "{{ slug }}"
description: The Team slug to perform the request on behalf of.
description: The Team slug to perform the request on behalf of.
UPDATE examples
- update
Update an existing check run for a deployment.
UPDATE vercel.checks.check_runs
SET
external_id = '{{ external_id }}',
external_url = '{{ external_url }}',
status = '{{ status }}',
output = '{{ output }}',
completed_at = {{ completed_at }},
conclusion = '{{ conclusion }}',
conclusion_text = '{{ conclusion_text }}'
WHERE
deployment_id = '{{ deployment_id }}' --required
AND check_run_id = '{{ check_run_id }}' --required
AND team_id = '{{ team_id}}'
AND slug = '{{ slug}}'
RETURNING
id,
name,
check_id,
deployment_id,
external_id,
owner_id,
project_id,
blocks,
completed_at,
conclusion,
conclusion_text,
created_at,
external_url,
output,
requires,
source,
status,
targets,
timeout,
updated_at;