You can now programmatically enable and configure GitHub Code Quality on individual repositories using the new Repository Enablement API, available today in public preview.

Two new endpoints are now available:

PATCH /repos/{owner}/{repo}/code-quality/setup: Enable or disable Code Quality default setup for a repository, configure the languages to analyze, and specify the runner type.

GET /repos/{owner}/{repo}/code-quality/setup: Retrieve the current Code Quality configuration for a repository, including state, languages, runner type, and analysis schedule.

Supported languages include csharp, go, java-kotlin, javascript-typescript, python, and ruby.