List code quality findings for a repository
Lists 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
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”The account owner of the repository. The name is not case sensitive.
The name of the repository without the .git extension. The name is not case sensitive.
Query Parameters
Section titled “ Query Parameters ”The number of results per page (max 100). For more information, see “Using pagination in the REST API.”
The direction to sort the results by.
A 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.”
A 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.”
If specified, only code quality findings with this state will be returned.
Responses
Section titled “ Responses ”Response
Code quality finding
object
The finding number.
State of the code quality finding.
The REST API URL of the code quality finding resource.
Code quality rule
object
A unique identifier for the rule used to detect the finding.
The name of the rule used to detect the finding.
A short description of the rule used to detect the finding.
A detailed description of the rule used to detect the finding.
The severity of the rule used to detect the finding.
The category of the rule used to detect the finding.
Code quality file location
object
The file path where the finding was detected.
The line number where the finding starts.
The column number where the finding starts.
The line number where the finding ends.
The column number where the finding ends.
Code quality finding message
object
The message text of the code quality finding.
The message text of the code quality finding in markdown format.
The time the code quality finding was created.
Examples
[ { "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.", "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.
Basic Error
object
Example generated
{ "message": "example", "documentation_url": "example", "url": "example", "status": "example"}Resource not found
Basic Error
object
Example generated
{ "message": "example", "documentation_url": "example", "url": "example", "status": "example"}Service unavailable
object
Example generated
{ "code": "example", "message": "example", "documentation_url": "example"}