Use the REST API to manage a code quality configuration.
Note
Most endpoints use Authorization: Bearer <YOUR-TOKEN> and Accept: application/vnd.github+json headers, plus X-GitHub-Api-Version: 2026-03-10. Curl examples below omit these standard headers for brevity.
GET /repos/{owner}/{repo}/code-quality/findings
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.
accept (string)application/vnd.github+json is recommended.owner (string) (required)
The account owner of the repository. The name is not case sensitive.
repo (string) (required)
The name of the repository without the .git extension. The name is not case sensitive.
per_page (integer)
The number of results per page (max 100). For more information, see "Using pagination in the REST API."
Default: 30
direction (string)
The direction to sort the results by.
Default: desc
Can be one of: asc, desc
before (string)
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."
after (string)
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."
state (string)
If specified, only code quality findings with this state will be returned.
Can be one of: open, dismissed
200 - OK
403 - Response if the user is not authorized to access Code quality for this repository.
404 - Resource not found
503 - Service unavailable
Request:
curl -L \
-X GET \
https://api.github.com/repos/OWNER/REPO/code-quality/findings
Response schema (Status: 200):
Array of objects:
number: required, integerstate: required, string, enum: open, dismissedurl: required, string, format: urirule: required, object:
id: required, stringtitle: required, stringdescription: required, stringhelp: stringseverity: required, string, enum: error, warning, note, nonecategory: required, string, enum: none, maintainability, reliabilitylocation: required, object:
path: required, stringstart_line: integerstart_column: integerend_line: integerend_column: integermessage: required, object:
text: required, stringmarkdown: required, stringcreated_at: string, format: date-timeGET /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.
accept (string)application/vnd.github+json is recommended.owner (string) (required)
The account owner of the repository. The name is not case sensitive.
repo (string) (required)
The name of the repository without the .git extension. The name is not case sensitive.
finding_number (integer) (required)
The number that identifies a finding.
200 - OK
403 - Response if the user is not authorized to access Code quality for this repository.
404 - Resource not found
503 - Service unavailable
Request:
curl -L \
-X GET \
https://api.github.com/repos/OWNER/REPO/code-quality/findings/FINDING_NUMBER
Response schema (Status: 200):
number: required, integerstate: required, string, enum: open, dismissedurl: required, string, format: urirule: required, object:
id: required, stringtitle: required, stringdescription: required, stringhelp: stringseverity: required, string, enum: error, warning, note, nonecategory: required, string, enum: none, maintainability, reliabilitylocation: required, object:
path: required, stringstart_line: integerstart_column: integerend_line: integerend_column: integermessage: required, object:
text: required, stringmarkdown: required, stringcreated_at: string, format: date-timeGET /repos/{owner}/{repo}/code-quality/setup
Gets a code quality setup configuration.
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.
accept (string)application/vnd.github+json is recommended.owner (string) (required)
The account owner of the repository. The name is not case sensitive.
repo (string) (required)
The name of the repository without the .git extension. The name is not case sensitive.
200 - OK
403 - Response if the user is not authorized to access Code quality for this repository.
404 - Resource not found
503 - Service unavailable
Request:
curl -L \
-X GET \
https://api.github.com/repos/OWNER/REPO/code-quality/setup
Response schema (Status: 200):
state: string, enum: configured, not-configuredlanguages: array of string, enum: csharp, go, java-kotlin, javascript-typescript, python, ruby, rustrunner_type: string or null, enum: standard, labeled, nullrunner_label: string or nullupdated_at: string or null, format: date-timeschedule: string or null, enum: weekly, nullai_findings_option: string or null, enum: disabled, on_push, nullPATCH /repos/{owner}/{repo}/code-quality/setup
Updates a code quality setup configuration.
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.
accept (string)application/vnd.github+json is recommended.owner (string) (required)
The account owner of the repository. The name is not case sensitive.
repo (string) (required)
The name of the repository without the .git extension. The name is not case sensitive.
state (string)
The desired state of code quality setup.
Can be one of: configured, not-configured
runner_type (string)
Runner type to be used.
Can be one of: standard, labeled
runner_label (string or null)
Runner label to be used if the runner type is labeled.
languages (array of strings)
Languages to be analyzed.
Supported values are: csharp, go, java-kotlin, javascript-typescript, python, ruby
ai_findings_option (string)
Whether AI findings run for Code Quality on this repository.
Can be one of: disabled, on_push
200 - OK
202 - Accepted
403 - Response if the repository is archived or if Code quality is not enabled for this repository
404 - Resource not found
409 - Response if there is already a code quality setup configuration update in progress
422 - Response if the configuration change cannot be made
503 - Service unavailable
Request:
curl -L \
-X PATCH \
https://api.github.com/repos/OWNER/REPO/code-quality/setup \
-d '{
"state": "configured",
"languages": [
"javascript-typescript",
"python",
"ruby"
]
}'
Response schema (Status: 202):
run_id: integerrun_url: string