Skip to main content

annotations

Creates, updates, deletes, gets or lists an annotations resource.

Overview

Nameannotations
TypeResource
Idgithub.checks.annotations

Fields

The following fields are returned by SELECT queries:

Response

NameDatatypeDescription
annotation_levelstring (example: warning)
blob_hrefstring
end_columninteger
end_lineinteger
messagestring (example: Check your spelling for 'banaas'.)
pathstring (example: README.md)
raw_detailsstring (example: Do you mean 'bananas' or 'banana'?)
start_columninteger
start_lineinteger
titlestring (example: Spell Checker)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_annotationsselectowner, repo, check_run_idper_page, pageLists annotations for a check run using the annotation id.

OAuth app tokens and personal access tokens (classic) need the repo scope to use this endpoint on a private repository.

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.

NameDatatypeDescription
check_run_idintegerThe unique identifier of the check run.
ownerstringThe account owner of the repository. The name is not case sensitive.
repostringThe name of the repository without the .git extension. The name is not case sensitive.
pageintegerThe page number of the results to fetch. For more information, see "Using pagination in the REST API."
per_pageintegerThe number of results per page (max 100). For more information, see "Using pagination in the REST API."

SELECT examples

Lists annotations for a check run using the annotation id.

OAuth app tokens and personal access tokens (classic) need the repo scope to use this endpoint on a private repository.

SELECT
annotation_level,
blob_href,
end_column,
end_line,
message,
path,
raw_details,
start_column,
start_line,
title
FROM github.checks.annotations
WHERE owner = '{{ owner }}' -- required
AND repo = '{{ repo }}' -- required
AND check_run_id = '{{ check_run_id }}' -- required
AND per_page = '{{ per_page }}'
AND page = '{{ page }}'
;