Skip to content

Get a code quality setup configuration

GET
/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.

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.

Response

Media typeapplication/json

Configuration for code quality setup.

object
state

Code quality setup has been configured or not.

string
Allowed values: configured not-configured
languages

Languages to be analyzed.

Array<string>
Allowed values: csharp go java-kotlin javascript-typescript python ruby rust
runner_type

Runner type to be used.

string
nullable
Allowed values: standard labeled
runner_label

Runner label to be used if the runner type is labeled.

string
nullable
updated_at

Timestamp of latest configuration update.

string format: date-time
nullable
schedule

The frequency of the periodic analysis.

string
nullable
Allowed values: weekly
ai_findings_option

The AI findings configuration for the repository.

string
nullable
Allowed values: disabled on_push
Examples
Exampledefault
{
"state": "configured",
"languages": [
"javascript-typescript",
"python"
],
"runner_type": "standard",
"runner_label": null,
"updated_at": "2023-01-01T00:00:00Z",
"schedule": "weekly",
"ai_findings_option": "on_push"
}

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

Media typeapplication/json
Basic Error

Basic Error

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

Resource not found

Media typeapplication/json
Basic Error

Basic Error

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

Service unavailable

Media typeapplication/json
object
code
string
message
string
documentation_url
string
Examplegenerated
{
"code": "example",
"message": "example",
"documentation_url": "example"
}