GitHub Code Quality can cover one repository or thousands from a single control point, giving every team the same quality baseline and giving you the guardrails to keep it there.
Code Quality is controlled at three levels, so you can decide how much autonomy to give organizations and repositories:
When Code Quality is enabled on a repository, CodeQL analysis runs via GitHub Actions and surfaces findings in pull requests and on the default branch. Developers see quality checks and annotations on their pull requests.
At the organization level, you control Code Quality with a single Repository access setting. This setting determines which repositories have Code Quality enabled and which have it disabled: repositories within your selection are enabled, and repositories outside your selection are disabled.
Important
Changing the Repository access setting can both enable and disable Code Quality across many repositories at once. For example, if you enable Code Quality for repositories matching a filter, any repository that does not match the filter is disabled. Before your change is applied, a dialog shows the total number of enabled and disabled repositories, along with the billing impact.
You can apply one of the following options at a time.
| Option | Behavior |
|---|---|
| No repositories | Disables Code Quality for all current and future repositories in the organization. |
| Let repositories decide | The organization neither enables nor disables Code Quality. Repository administrators choose whether to enable it for their own repositories. This option cannot be enforced. |
| All repositories | Enables Code Quality for all current and future repositories. |
| Selected repositories... | Enables Code Quality for a specific list of repositories that you choose. Repositories you do not select are disabled, and new repositories are not enabled automatically. Best for pilots or exceptions. |
| Matching a filter... | Enables Code Quality for repositories that match a filter you define, now and in the future. Repositories that do not match are disabled. See Filtering repositories. |
When you choose Matching a filter..., you create a dynamic filter that automatically enables Code Quality for existing and future repositories that match your criteria. This is useful for ongoing governance at scale.
You can filter on any combination of the following criteria:
team:platform property.All conditions in a filter are combined with AND, so a repository must match every condition to be enabled. You can also exclude repositories that match specific conditions.
By default, repository administrators can change Code Quality settings for their own repositories. To prevent this, enable Enforce access.
Enforcement locks in both the enabled and disabled states set by your Repository access option, so repository administrators cannot override them. This improves consistency across your organization, but reduces flexibility for individual repository administrators.
Because a single Repository access setting change can enable Code Quality across many repositories at once, and each analysis consumes GitHub Actions minutes, it's worth rolling out in phases rather than all at once. As you plan, weigh a few things:
For a step-by-step rollout procedure, including piloting your quality thresholds in evaluate mode before you enforce them, see Rolling out GitHub Code Quality at scale.