Skip to content

Get a code quality finding

GET
/repos/{owner}/{repo}/code-quality/findings/{finding_number}

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.

API method documentation

owner
required
string

The account owner of the repository. The name is not case sensitive.

repo
required
string

The name of the repository without the .git extension. The name is not case sensitive.

finding_number
required
integer

The number that identifies a finding.

Response

Media type application/json

Code quality finding

object
number
required

The finding number.

integer
state
required

State of the code quality finding.

string
Allowed values: open dismissed
url
required

The REST API URL of the code quality finding resource.

string format: uri
rule
required

Code quality rule

object
id
required

A unique identifier for the rule used to detect the finding.

string
title
required

The name of the rule used to detect the finding.

string
description
required

A short description of the rule used to detect the finding.

string
help

A detailed description of the rule used to detect the finding.

string
severity
required

The severity of the rule used to detect the finding.

string
Allowed values: error warning note none
category
required

The category of the rule used to detect the finding.

string
Allowed values: none maintainability reliability
location
required

Code quality file location

object
path
required

The file path where the finding was detected.

string
start_line

The line number where the finding starts.

integer
start_column

The column number where the finding starts.

integer
end_line

The line number where the finding ends.

integer
end_column

The column number where the finding ends.

integer
message
required

Code quality finding message

object
text
required

The message text of the code quality finding.

string
markdown
required

The message text of the code quality finding in markdown format.

string
created_at

The time the code quality finding was created.

string format: date-time
Examples
Example default
{
"number": 42,
"state": "open",
"url": "https://api.github.com/repos/octocat/hello-world/code-quality/findings/42",
"rule": {
"id": "java/useless-null-check",
"title": "Useless null check",
"description": "Checking whether an expression is null when that expression cannot possibly be null is useless.",
"help": "# Useless null check\nSometimes you can guarantee that a particular variable will never be null. For example when that variable has just been assigned a newly created object or is the exception caught by a `catch` clause. A null check on such a variable is ...",
"severity": "warning",
"category": "maintainability"
},
"location": {
"path": "java/UselessNullCheck.java",
"start_line": 9,
"start_column": 4,
"end_line": 9,
"end_column": 18
},
"message": {
"text": "This check is useless. o cannot be null at this check, since it is guarded by instanceof.",
"markdown": "This check is useless. [o](java/UselessNullCheck.java#L9C4-L9C18) cannot be null at this check, since it is guarded by [...instanceof...](java/UselessNullCheck.java#L7C13-L7C25)."
},
"created_at": "2026-01-23T12:34:56Z"
}

Response if the user is not authorized to access Code quality for this repository.

Media type application/json
Basic Error

Basic Error

object
message
string
documentation_url
string
url
string
status
string
Example generated
{
"message": "example",
"documentation_url": "example",
"url": "example",
"status": "example"
}

Resource not found

Media type application/json
Basic Error

Basic Error

object
message
string
documentation_url
string
url
string
status
string
Example generated
{
"message": "example",
"documentation_url": "example",
"url": "example",
"status": "example"
}

Service unavailable

Media type application/json
object
code
string
message
string
documentation_url
string
Example generated
{
"code": "example",
"message": "example",
"documentation_url": "example"
}