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 type application/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
Examples
Example default
{
"state": "configured",
"languages": [
"javascript-typescript",
"python"
],
"runner_type": "standard",
"runner_label": null,
"updated_at": "2023-01-01T00:00:00Z",
"schedule": "weekly"
}

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"
}