Skip to main content

findings

Creates, updates, deletes, gets or lists a findings resource.

Overview

Namefindings
TypeResource
Idgithub.code_quality.findings

Fields

The following fields are returned by SELECT queries:

Response

NameDatatypeDescription
created_atstring (date-time)The time the code quality finding was created.
locationobjectCode quality file location
messageobjectCode quality finding message
numberintegerThe finding number.
ruleobjectCode quality rule
statestringState of the code quality finding. (open, dismissed)
urlstring (uri)The REST API URL of the code quality finding resource.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_findingselectowner, repo, finding_numberGets a single code quality finding.

OAuth app tokens and personal access tokens (classic) need the repo scope to use this endpoint with private or public repositories, or the public_repo scope to use this endpoint with only public repositories.
list_findings_for_reposelectowner, repoper_page, direction, before, after, stateLists code quality findings for a repository.

OAuth app tokens and personal access tokens (classic) need the repo scope to use this endpoint with private or public repositories, or the public_repo scope to use this endpoint with only public repositories.

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
finding_numberintegerThe number that identifies a finding.
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.
afterstringA cursor, as given in the Link header. If specified, the query only searches for results after this cursor. For more information, see "Using pagination in the REST API."
beforestringA cursor, as given in the Link header. If specified, the query only searches for results before this cursor. For more information, see "Using pagination in the REST API."
directionstringThe direction to sort the results by.
per_pageintegerThe number of results per page (max 100). For more information, see "Using pagination in the REST API."
statestringIf specified, only code quality findings with this state will be returned.

SELECT examples

Gets a single code quality finding.

OAuth app tokens and personal access tokens (classic) need the repo scope to use this endpoint with private or public repositories, or the public_repo scope to use this endpoint with only public repositories.

SELECT
created_at,
location,
message,
number,
rule,
state,
url
FROM github.code_quality.findings
WHERE owner = '{{ owner }}' -- required
AND repo = '{{ repo }}' -- required
AND finding_number = '{{ finding_number }}' -- required
;