Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ To get started with {% data variables.enterprise.data_residency_short %}, you wi

1. Click **Create enterprise**.

Your enterprise can take a few hours to be provisioned. When it's ready, you'll receive a welcome email and an invitation to reset your password, delivered to the "Admin work email" address.
Your enterprise can take a few hours to be provisioned. You'll receive a welcome email and an invitation to reset your password, delivered to the "Admin work email" address. If opening the password reset link displays a certificate error (such as `net::ERR_CERT_COMMON_NAME_INVALID`), wait for provisioning to finish, then try the link again.

## 2. Add users to your enterprise

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,9 @@ From {% data variables.product.prodname_dotcom %}:

### Setting up streaming to Azure Event Hubs

> [!NOTE] Event Hubs instances in Azure Government are not supported.
> [!NOTE]
> - Event Hubs instances in Azure Government are not supported.
> - With **{% data variables.enterprise.data_residency %},** audit log streaming to Azure Event Hubs is not supported with IP Firewall rules enabled.

Before setting up a stream in {% data variables.product.prodname_dotcom %}, you need:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ Phased upgrade execution allows {% data variables.product.prodname_ghe_server %}
1. Run the upgrade phase

```shell
ghe-upgrade --phase pre-upgrade GITHUB-UPGRADE.pkg
ghe-upgrade --phase upgrade GITHUB-UPGRADE.pkg
```

1. Optionally, after the upgrade, validate the upgrade by configuring an IP exception list to allow access to a specified list of IP addresses. See [AUTOTITLE](/admin/administering-your-instance/configuring-maintenance-mode/enabling-and-scheduling-maintenance-mode#validating-changes-in-maintenance-mode-using-the-ip-exception-list).
Expand Down
17 changes: 8 additions & 9 deletions content/code-security/concepts/code-quality/code-quality.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@ category:

{% data variables.product.prodname_code_quality %} analyzes your code for quality and coverage issues and delivers {% data variables.product.prodname_copilot_short %}-powered fixes you can apply in one click. It runs in two places:

* **On pull requests**, findings appear as inline comments before code is merged. If you upload a Cobertura XML coverage report, coverage metrics show whether a change maintains or reduces coverage. You can enforce quality and coverage thresholds with rulesets to block pull requests that don't meet your criteria, so new quality debt doesn't accumulate.
* **On the default branch**, scans identify existing quality debt across your codebase, with autofixes you can apply directly or assign to {% data variables.copilot.copilot_cloud_agent %} to resolve on your behalf.
* **On pull requests**, {% data variables.product.prodname_code_quality_short %} uses deterministic {% data variables.product.prodname_codeql %} rules to detect known anti-patterns and posts findings as inline comments before code is merged. If you upload a Cobertura XML coverage report, coverage metrics show whether a change maintains or reduces coverage. You can enforce quality and coverage thresholds with rulesets to block pull requests that don't meet your criteria, so new quality debt doesn't accumulate.
* **On the default branch**, rules-based scans identify existing quality debt across your codebase, with autofixes you can apply directly or assign to {% data variables.copilot.copilot_cloud_agent %} to resolve on your behalf. AI-powered analysis also runs on recently changed files, flagging issues that fall outside existing rule sets, including languages not yet covered by {% data variables.product.prodname_codeql %} queries.

Detection combines deterministic {% data variables.product.prodname_codeql %} rules for known anti-patterns with AI-powered analysis for issues that fall outside existing rule sets, including languages not yet covered by {% data variables.product.prodname_codeql %} queries.
> [!NOTE]
> On pull requests, {% data variables.product.prodname_code_quality_short %} posts rules-based {% data variables.product.prodname_codeql %} findings only. If you also want AI-powered reviews of your pull requests, you can enable {% data variables.copilot.copilot_code-review %} separately. See [AUTOTITLE](/copilot/concepts/agents/code-review).

## Use cases

Expand All @@ -32,8 +33,8 @@ Here's what {% data variables.product.prodname_code_quality %} looks like in pra
For developers and teams:

* **A developer opens a pull request** that introduces a reliability or maintainability issue. {% data variables.product.prodname_code_quality_short %} posts a comment explaining the issue and offers a one-click fix before the code is merged. The developer also sees a report of coverage metrics, and can tell at a glance whether the pull request improves or reduces coverage compared to the default branch.
* **A team adopts AI coding assistants** and needs assurance that generated code meets the same bar as hand-written code. AI-powered analysis catches issues that rule-based queries weren't written for, while {% data variables.product.prodname_codeql %} rules cover well-defined anti-patterns.
* **A team inherits a large codebase** with years of accumulated quality debt. {% data variables.product.prodname_code_quality_short %} scans the default branch, surfaces findings with autofixes on a dashboard, and the team assigns remediation work to {% data variables.copilot.copilot_cloud_agent %} to open fix pull requests automatically.
* **A team adopts AI coding assistants** and needs assurance that generated code meets the same bar as hand-written code. AI-powered analysis catches issues in recently changed files that rule-based queries weren't written for, while {% data variables.product.prodname_codeql %} rules cover well-defined anti-patterns.

For administrators and leads:

Expand All @@ -45,7 +46,7 @@ For administrators and leads:
Usage costs are determined by:

* A per-seat license fee based on active committers.
* AI-powered detections and {% data variables.product.prodname_copilot_short %}-powered autofixes, which consume {% data variables.product.prodname_ai_credits %} (no {% data variables.product.prodname_copilot_short %} license required).
* {% data variables.product.prodname_copilot_short %}-powered autofixes for findings in pull requests and on the default branch, alongside AI-powered detections on recently merged code, which consume {% data variables.product.prodname_ai_credits %} (no {% data variables.product.prodname_copilot_short %} license required).
* {% data variables.product.prodname_actions %} minutes for deterministic {% data variables.product.prodname_codeql %} scans, if you don't use self-hosted runners.

Optional features, such as delegating code quality remediation work to {% data variables.product.prodname_copilot_short %}, require a {% data variables.product.prodname_copilot_short %} license.
Expand All @@ -58,10 +59,8 @@ For more information, see [AUTOTITLE](/billing/concepts/product-billing/github-c

{% data reusables.code-quality.codeql-supported-languages %}

It also performs AI-powered analysis on pull requests and on your repository's recently changed code, including languages beyond those supported by rule-based queries.
{% data variables.product.prodname_code_quality_short %} also performs AI-powered analysis on your repository's recently changed code, including languages beyond those supported by rule-based queries.

## Next steps

* **For your enterprise:** Ensure repositories in your enterprise can enable {% data variables.product.prodname_code_quality_short %}. See [AUTOTITLE](/code-security/how-tos/secure-at-scale/configure-enterprise-security/configure-specific-tools/allow-github-code-quality-in-enterprise?utm_campaign=code-quality-ga-july-2026&utm_medium=docs&utm_source=docs-cq-intro-enable-cq-enterprise).
* **For your repository or organization:** Turn on {% data variables.product.prodname_code_quality_short %} to start generating results. See [AUTOTITLE](/code-security/how-tos/maintain-quality-code/enable-code-quality?utm_campaign=code-quality-ga-july-2026&utm_medium=docs&utm_source=docs-cq-intro-enable-cq-repo).
* **On your pull request:** Learn how to fix code quality findings on your pull request. See [AUTOTITLE](/code-security/tutorials/improve-code-quality/catch-issues-before-merge?utm_campaign=code-quality-ga-july-2026&utm_medium=docs&utm_source=docs-cq-intro-fix-on-pr).
* Learn how to fix code quality findings on your pull request. See [AUTOTITLE](/code-security/tutorials/improve-code-quality/catch-issues-before-merge?utm_campaign=code-quality-ga-july-2026&utm_medium=docs&utm_source=docs-cq-intro-fix-on-pr).
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,3 @@ For the available access options, and how filtering and enforcement work, see [A
Your changes are saved automatically and begin to propagate immediately. In large organizations, it can take several minutes for the changes to apply across all repositories.

If you're rolling out the feature across many teams, we recommend you pilot on a small group and tune your quality thresholds before you enable everywhere. See [AUTOTITLE](/code-security/how-tos/maintain-quality-code/roll-out-at-scale).

## Next steps

* **Add code coverage:** Upload reported code coverage from your test suite to see coverage results directly on pull requests. {% data reusables.code-quality.workflow-generation %}
* **For your organization:** Understand the code health of your repositories at a glance. See [AUTOTITLE](/code-security/how-tos/maintain-quality-code/explore-code-quality).
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Exploring GitHub Code Quality results in your organization
shortTitle: Explore code quality
intro: Understand your organization's code health at a glance with the organization-level dashboard for {% data variables.product.prodname_code_quality_short %}.
intro: Use the organization-level {% data variables.product.prodname_code_quality_short %} dashboard to spot repositories that need attention and track your organization's code health at a glance.
product: '{% data reusables.gated-features.code-quality-availability %}'
permissions: Organization members
audience:
Expand Down Expand Up @@ -52,7 +52,3 @@ You can sort the repository table in ascending or descending order for any colum
1. Scroll down to the repository table. By default, the table is sorted from most to least recent repository scan, helping you prioritize current quality issues.
1. Optionally, to prioritize repositories with the highest number of {% data variables.product.prodname_codeql %} findings, click **Standard Findings** twice.
1. To view the repository-level dashboard for a specific repository, click the repository's name.

## Next steps

To understand the code health information available on the repository-level dashboard, see [AUTOTITLE](/code-security/how-tos/maintain-quality-code/interpret-results).
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,15 @@ category:

## How {% data variables.product.prodname_code_quality_short %} works on pull requests

When you open a pull request, {% data variables.product.prodname_code_quality_short %} runs **two types of analysis** and posts findings as comments on the pull request.

1. **`{% data variables.code-quality.pr_commenter %}` findings**: {% data variables.product.prodname_code_quality_short %} uses {% data variables.product.prodname_codeql %} to perform a rule-based scan of your changes. These findings are posted as comments by `{% data variables.code-quality.pr_commenter %}` and include a suggested autofix. Findings are labeled by severity (**Error**, **Warning**, **Note**), and administrators can set quality gates to block merges based on the severity of these findings.

1. **{% data variables.product.prodname_copilot_short %} findings**: If your organization has {% data variables.product.prodname_copilot_short %} licenses and AI features are enabled for your enterprise, {% data variables.product.prodname_code_quality_short %} uses **{% data variables.copilot.copilot_code-review_short %}** to identify quality issues that rules-based analysis may not detect. These findings are posted as comments by **{% data variables.product.prodname_copilot_short %}**, and include a suggested autofix. See [AUTOTITLE](/copilot/concepts/agents/code-review).
When you open a pull request, {% data variables.product.prodname_code_quality_short %} uses {% data variables.product.prodname_codeql %} to perform a rule-based scan of your changes and posts findings as comments by `{% data variables.code-quality.pr_commenter %}`. Each finding includes a suggested autofix. Findings are labeled by severity (**Error**, **Warning**, **Note**), and administrators can set quality gates to block merges based on the severity of these findings.

## Resolving a finding

1. On {% data variables.product.github %}, navigate to your open pull request.
1. On the **Files Changed** tab, scroll to a comment left by **`{% data variables.code-quality.pr_commenter %}`** or **{% data variables.product.prodname_copilot_short %}**.
1. On the **Files Changed** tab, scroll to a comment left by **`{% data variables.code-quality.pr_commenter %}`**.
{% data reusables.code-quality.review-comment-and-autofix %}
{% data reusables.code-quality.apply-suggestion %}
1. Alternatively, if the finding isn't relevant or actionable, you can dismiss the finding. For example, you might dismiss a finding that is in legacy code no longer maintained, is a known exception to your team's coding standards, or is a false positive that doesn't pose a real quality risk.
* For comments left by `{% data variables.code-quality.pr_commenter %}`, click **Dismiss finding**.
* For comments left by {% data variables.product.prodname_copilot_short %}, click **Resolve**.
1. Alternatively, if the finding isn't relevant or actionable, you can dismiss it by clicking **Dismiss finding**. For example, you might dismiss a finding that is in legacy code no longer maintained, is a known exception to your team's coding standards, or is a false positive that doesn't pose a real quality risk.

## Delegating remediation work to {% data variables.product.prodname_copilot_short %}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Interpreting the code quality results for your repository
shortTitle: Interpret results
allowTitleToDifferFromFilename: true
intro: Understand the maintainability and reliability of your codebase so you can prioritize where your teams focus remediation effort.
intro: Use {% data variables.product.prodname_code_quality_short %} results to assess the maintainability and reliability of your codebase, so your teams can focus remediation where it matters most.
versions:
feature: code-quality
product: '{% data reusables.gated-features.code-quality-availability %}'
Expand Down Expand Up @@ -53,8 +53,3 @@ Code quality results should always be interpreted in the context of your reposit
* Large repositories with a lot of code in a fully supported language often have many results even if the majority of the code has good maintainability and reliability standards.

To learn more about the metrics and how the scores are calculated, see [AUTOTITLE](/code-security/reference/code-quality/metrics-and-ratings).

## Next steps

* Remediate quality findings in your default branch and improve the maintainability and reliability score for your repository. See [AUTOTITLE](/code-security/tutorials/improve-code-quality/raise-your-quality-rating).
* Stop your repository from accumulating more code quality problems by setting a quality threshold for pull requests using rulesets. See [AUTOTITLE](/code-security/how-tos/maintain-quality-code/set-pr-thresholds).
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,3 @@ If you need automation around your rollout, you can fetch {% data variables.prod
Enabling {% data variables.product.prodname_code_quality_short %} does not automatically turn on code coverage. Coverage is opt-in per repository, and it starts reporting only after a workflow that uploads coverage data is added to the repository. This means teams can adopt {% data variables.product.prodname_code_quality_short %} first and add coverage later.

To set up coverage for a repository, see [AUTOTITLE](/code-security/how-tos/maintain-quality-code/set-up-code-coverage).

## Next steps

Now that you've rolled out {% data variables.product.prodname_code_quality_short %} across your organization, you can assess the health of your repositories at a glance and decide where to focus. See [AUTOTITLE](/code-security/how-tos/maintain-quality-code/explore-code-quality).
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Setting code quality thresholds for pull requests
shortTitle: Set quality thresholds
intro: Enforce your code quality standards automatically by blocking pull requests that fall below the thresholds you set, at the repository or organization level.
intro: Keep low-quality changes out of your codebase by using {% data variables.product.prodname_code_quality_short %} thresholds to block pull requests that don't meet your standards.
allowTitleToDifferFromFilename: true
versions:
feature: code-quality
Expand Down Expand Up @@ -51,7 +51,7 @@ The following steps create or update a ruleset at the repository level. To enfor
1. If you don't already have a ruleset to protect your default branch, expand **New ruleset** and click **New branch ruleset**. Alternatively, open your existing ruleset for the default branch and move to step 5.
1. If you are creating a new ruleset:
* Define a name for the ruleset.
* Set the "Enforcement status" to "Active."
* Set the "Enforcement status" to "Evaluate" while you calibrate the threshold during a pilot. If you want to enforce the threshold immediately, select "Active."
* Under "Target branches" add a target of "Include default branch."
1. Under "Branch rules", enable "Require code quality results".
1. Set "Severity" to define the lowest severity of code quality results that must be resolved before a pull request can be merged into the default branch. For example:
Expand All @@ -61,10 +61,8 @@ The following steps create or update a ruleset at the repository level. To enfor
* Set "All" to block pull requests with **any** unresolved code quality results being merged.
1. When you have finished defining or editing the ruleset, click **Create** or **Save changes**.

If you selected "Evaluate", review the ruleset insights to see which pull requests would have been blocked. When the results match the quality bar you want, change the enforcement status to "Active."

## Setting a code coverage threshold

You can also block pull requests that fall below a code coverage threshold. This uses a separate **Restrict code coverage** rule, not the **Require code quality results** rule used above, and your repository must upload code coverage data first. For the full procedure, see [AUTOTITLE](/code-security/how-tos/maintain-quality-code/restrict-code-coverage).

## Next steps

Learn how {% data variables.product.prodname_code_quality %} works on pull requests to prevent code quality issues from reaching your default branch. See [AUTOTITLE](/code-security/tutorials/improve-code-quality/catch-issues-before-merge).
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Setting up code coverage for your repository
shortTitle: Set up code coverage
intro: 'Give your teams visibility into code coverage directly on pull requests, without paying for or maintaining a separate third-party coverage service.'
intro: 'Use built-in code coverage from {% data variables.product.prodname_code_quality_short %} to find untested code on pull requests, without paying for or maintaining a separate third-party service.'
versions:
feature: code-quality
product: '{% data reusables.gated-features.code-quality-availability %}'
Expand Down Expand Up @@ -163,8 +163,3 @@ jobs:
1. After the workflow completes, look for a comment from `{% data variables.code-quality.pr_commenter %}` on the pull request. The comment includes:
* The aggregate coverage percentage for the pull request branch compared to the default branch.
* A per-file breakdown showing which files gained or lost coverage.

## Next steps

* **Interpret results:** Understand coverage metrics and per-file breakdowns on your pull requests. See [AUTOTITLE](/code-security/how-tos/maintain-quality-code/interpret-results).
* **Enforce coverage thresholds:** Block pull requests that don't meet a minimum coverage percentage or that cause coverage to drop. See [AUTOTITLE](/code-security/how-tos/maintain-quality-code/restrict-code-coverage).
Loading
Loading