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
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,10 +1,21 @@
## Managing requests to bypass push rules
---
title: Managing requests to bypass push rules
intro: View and manage requests for bypass privileges to push commits containing restricted content to a repository.
allowTitleToDifferFromFilename: true
permissions: Enterprise owners
versions:
feature: repo-policy-rules
shortTitle: Manage requests to bypass push rules
contentType: how-tos
category:
- Manage accounts and repositories
---

> [!NOTE] Repository policy delegated bypass is in {% data variables.release-phases.public_preview %} and subject to change.

You can view and manage all requests for bypass privileges on the “Bypass Requests" page, located under the **Policy** settings.

You can filter requests by approver (member of the bypass list), requester (contributor making the request), timeframe, and status. The following statuses are assigned to a request:
Filter requests by approver (member of the bypass list), requester (contributor making the request), timeframe, and status. The following statuses are assigned to a request:

|Status|Description|
|---------|-----------|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ shortTitle: Govern repository usage
contentType: how-tos
category:
- Manage accounts and repositories
redirect_from:
- /enterprise-onboarding/govern-people-and-repositories/create-repository-policies
---

{% data reusables.enterprise.repo-policy-rules-preview %}

{% data reusables.enterprise.repo-policy-rules-intro %}

>[!TIP] If you're an **organization owner**, you can create a repository policy for a specific organization. See [AUTOTITLE](/organizations/managing-organization-settings/governing-how-people-use-repositories-in-your-organization).

## Examples

{% data reusables.enterprise.repo-policy-rules-examples %}
Expand All @@ -24,7 +24,9 @@ category:

First, you'll target organizations in your enterprise. You can select all organizations, choose from a list, or create a dynamic rule using `fnmatch` syntax. If you use {% data variables.product.prodname_emus %}, you can also choose to target all repositories owned by users in your enterprise.

Then, you'll target repositories in the selected organizations. {% data reusables.enterprise.repo-policy-rules-with-custom-properties %}
Then, you'll target repositories in the selected organizations. We recommend using repository policies alongside **custom repository properties**. By adding custom properties to repositories, you can flexibly target those repositories in a policy.

For example, you can add a property to mark repositories that contain production data or other sensitive information, then prevent anyone from making those repositories public.

## Interaction with other policies

Expand Down Expand Up @@ -73,11 +75,3 @@ Choose which repositories (current or future) to target in the selected organiza
### Delegating bypass of policies

{% data reusables.enterprise.repo-policy-rules-delegated-bypass %}

#### Managing bypass requests

{% data reusables.enterprise.repo-policy-rules-manage-bypass-request %}

## Further reading

To set additional policies for repository management, see [AUTOTITLE](/admin/enforcing-policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise).
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ versions:
ghes: '*'
children:
- /governing-how-people-use-repositories-in-your-enterprise
- /bypass-push-rules-requests
- /viewing-user-owned-repositories-in-your-enterprise
- /accessing-user-owned-repositories-in-your-enterprise
- /managing-custom-properties-for-repositories-in-your-enterprise
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ For more information about how {% data variables.product.prodname_ai_credits_sho
* Your license usage is calculated based on the number of unique, active committers to repositories with {% data variables.product.prodname_code_quality_short %} enabled.
* Each **active committer** uses **one {% data variables.product.prodname_code_quality_short %} license**.
* A committer is considered active if one of their commits has been pushed to the repository within the last 90 days, regardless of when it was originally authored.
* A committer is considered active if one of their commits has been pushed to the repository within the last 90 days, regardless of when it was originally authored.

To understand your license usage, and which licenses you can free up, it helps to distinguish between active and unique committers. You can see the number of licenses you're using on the **Licensing** page for your organization or enterprise, shown as **"Consumed licenses"**:
* **Active committers** are committers who contributed to at least one repository and have a {% data variables.product.prodname_team %} or {% data variables.product.prodname_enterprise %} license with your organization or enterprise. This includes members, enterprise-managed users, external collaborators, and people with a pending invitation to join your organization or enterprise.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
title: Automatic code coverage setup
shortTitle: Automatic code coverage
intro: 'An AI-powered agent can analyze your repository and generate a working code coverage workflow, so you can start tracking test coverage without manually authoring CI configuration.'
versions:
feature: code-quality
product: '{% data reusables.gated-features.code-quality-availability %}'
contentType: concepts
category:
- Improve code quality
---

When you use automatic setup for code coverage, an AI-powered agent analyzes your repository, identifies your test framework, and opens a pull request with a coverage workflow ready for review.

**There is no additional cost for using this feature.**

## How the agent works

The agent works in three phases:

1. **Discovery:** The agent reads your CI configuration, documentation, and build files to understand your project structure and identify your test framework.
1. **Execution:** The agent installs dependencies, builds the project, and runs your tests with coverage enabled. If coverage tooling is not already configured, the agent adds it to your project configuration (for example, `vitest.config.ts` or `jest.config.js`).
1. **Workflow integration:** If the agent produces a valid coverage report, it checks whether your repository already has a {% data variables.product.prodname_actions %} workflow that runs tests on pull requests. If so, the agent augments that workflow with a coverage upload step. If not, it creates a new workflow file and opens a pull request.

## When the agent stops

The agent may stop before opening a pull request in the following situations:

* **No tests found.** The agent couldn't find tests to instrument, so there's nothing to generate coverage for.
* **Can't reproduce the build.** Missing private registries, proprietary SDKs, or system dependencies prevent the agent from verifying the test suite.

If the agent stops or produces unexpected results, you can review the agent's session log for details. Navigate to the **Tasks** tab in your repository to find the session associated with the workflow generation attempt.
* **Unsupported coverage report conversion.** The agent won't reconstruct Cobertura XML from reports that only expose aggregated counters. For example, JaCoCo XML does not contain enough line and branch structure for a trustworthy Cobertura upload, so JVM projects that only produce JaCoCo XML may need manual setup instead.
## Pull request outcomes

> [!NOTE]
> The agent opens the pull request immediately with an initial planning commit that contains no code changes. The actual implementation commit typically arrives a few minutes later. If the pull request initially shows 0 changed files, wait a few minutes and refresh the page.

If the agent successfully opens a pull request, the pull request may be in one of these states:

* **Mergeable as-is:** The workflow completes successfully in CI and coverage uploads correctly.
* **Ready to iterate:** The workflow runs but requires adjustments (for example, missing secrets, self-hosted runner configuration, or path differences between local verification and CI).
* **Useful as a reference:** Maintainers may prefer to configure coverage themselves, using the agent's pull request as a starting point for the build and test commands it discovered.

## Further reading

* [AUTOTITLE](/code-security/how-tos/maintain-quality-code/set-up-code-coverage#automatic-setup)
* [AUTOTITLE](/code-security/concepts/code-quality/code-quality)
1 change: 1 addition & 0 deletions content/code-security/concepts/code-quality/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ contentType: concepts
children:
- /code-quality
- /enablement-at-scale
- /automatic-code-coverage-setup
---
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,5 @@ If you're rolling out the feature across many teams, we recommend you pilot on a

## Next steps

* **Add code coverage:** Upload reported code coverage from your test suite to see coverage results directly on pull requests. See [AUTOTITLE](/code-security/how-tos/maintain-quality-code/set-up-code-coverage).
* **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
Expand Up @@ -14,15 +14,55 @@ category:
- Improve code quality
---

You can set up code coverage for your repository in two ways:

* **Automatic setup:** Use the AI-powered agent to generate a workflow automatically. Choose this option if:
* You want to get started quickly without writing YAML configuration.
* Your project uses common test frameworks and build patterns.
* You're comfortable iterating on an AI-generated workflow.
* **Manual setup:** Configure your CI workflow yourself. Choose this option if:
* You need precise control over the coverage process.
* You have complex CI requirements (such as private registries or custom build steps).
* You want to understand exactly how coverage is configured.

## Automatic setup

You can use the automatic setup option to generate a working code coverage workflow without manually authoring CI configuration. An agent analyzes your repository, identifies your test framework, and opens a pull request with a coverage workflow ready for review.

> [!NOTE]
> Automatic setup uses AI to generate the workflow file. There is no additional cost for using this feature.

### Prerequisites for automatic setup

* {% data variables.product.prodname_code_quality_short %} is enabled for your repository. See [AUTOTITLE](/code-security/how-tos/maintain-quality-code/enable-code-quality).
* Your repository has an existing test suite.

### Generating a coverage workflow automatically

{% data reusables.repositories.navigate-to-repo %}
{% data reusables.repositories.sidebar-settings %}
1. In the sidebar, under "Security", click **{% data variables.code-quality.code_quality_ui_settings %}** to display the "{% data variables.code-quality.code_quality_ui %}" page.
1. In the "Code coverage analysis" section, click the **Setup** dropdown box.
1. In the list, select **Generate workflow with AI**. Wait for the agent to analyze your repository. The agent opens a draft pull request and posts a checklist of the steps it is working through.
1. To review the pull request, click **Review pull request**.
Review the pull request once the agent completes its work. The pull request description summarizes the changes, including any project configuration updates, workflow file changes, and coverage output settings.
1. If the workflow runs successfully in CI and coverage uploads correctly, merge the pull request.

If the workflow needs adjustments, see [AUTOTITLE](/code-security/concepts/code-quality/automatic-code-coverage-setup) for guidance on the different outcomes and how to iterate.

For more information about how the agent works and what to expect, see [AUTOTITLE](/code-security/concepts/code-quality/automatic-code-coverage-setup).

## Manual setup

Built-in code coverage lets you track how thoroughly your tests exercise your code, without adding a third-party service to your toolchain or budget. In the following procedures, you will generate a Cobertura XML coverage report from your test suite, upload it to {% data variables.product.github %}, and view the coverage results on your pull requests.

## Prerequisites
### Prerequisites for manual setup

* {% data variables.product.prodname_code_quality_short %} is enabled for your repository.
* Your repository has a test suite that runs in {% data variables.product.prodname_actions %}.
* Your test framework can produce a coverage report in **Cobertura XML** format.

## Step 1: Generate a Cobertura XML coverage report
### Step 1: Generate a Cobertura XML coverage report

Configure your test framework to output a coverage report in the Cobertura XML format. Code coverage works with any programming language that can produce this format.

Expand All @@ -40,7 +80,7 @@ Configure your test framework to output a coverage report in the Cobertura XML f
> [!TIP]
> If your framework isn't listed above, check its documentation for Cobertura output support. Many tools either support it directly or can convert to Cobertura XML from other formats.

## Step 2: Upload the coverage report
### Step 2: Upload the coverage report

After your tests generate a Cobertura XML report, upload it to {% data variables.product.github %} so coverage results appear on pull requests.

Expand Down Expand Up @@ -117,7 +157,7 @@ jobs:
label: code-coverage/pytest
```

## Step 3: View coverage results on pull requests
### Step 3: View coverage results on pull requests

1. Open a pull request (or push to an existing one) that triggers the workflow you configured.
1. After the workflow completes, look for a comment from `{% data variables.code-quality.pr_commenter %}` on the pull request. The comment includes:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ GitHub's security and quality platform includes several AI-powered capabilities
* **Copilot Autofix for code scanning**: Automatically generates fix suggestions for CodeQL alerts on pull requests and the default branch.
* **Generic secret detection**: Uses a model to identify unstructured secrets in source code that deterministic pattern matching cannot find.
* **Custom pattern regex generator**: Uses AI to generate regular expressions for custom secret scanning patterns from natural language descriptions.
* **GitHub Code Quality**: Surfaces code quality issues and offers LLM-powered fix suggestions on pull requests and the default branch.
* **GitHub Code Quality**: Surfaces code quality issues and offers LLM-powered fix suggestions on pull requests and the default branch. Also provides AI-powered automatic generation of code coverage workflows.

Copilot Autofix is an expansion of code scanning that provides users with targeted recommendations to help them fix code scanning alerts, avoiding the introduction of new security vulnerabilities. Potential fixes are generated automatically by large language models (LLMs) using data from the codebase and from code scanning analysis. Copilot Autofix is available for CodeQL analysis and does not require a GitHub Copilot subscription.

Expand All @@ -50,7 +50,7 @@ Secret scanning's generic secret detection is an AI-powered expansion of secret

Secret scanning's custom pattern regular expression generator makes it possible to define custom secret scanning patterns without knowledge of regular expressions. Users input a natural language description of what they want to detect, along with optional example strings, and the generator produces up to three candidate regular expressions. These patterns can then be validated via the dry-run mechanism before being deployed as custom patterns. The regular expression generator does not require a GitHub Copilot subscription.

GitHub Code Quality helps users improve code reliability, maintainability, and overall project health by surfacing actionable feedback and offering automatic fixes for findings in pull requests and on the default branch. When Code Quality is enabled, two types of analysis run: CodeQL quality queries identify problems with the maintainability, reliability, or style of code, and LLM-powered analysis provides additional insights beyond what deterministic engines can find. When a quality issue is detected, Copilot Autofix suggests a relevant fix. On pull requests, results are displayed as comments left by the `github-code-quality` bot. On the default branch, LLM-powered findings are displayed in the **AI findings** dashboard under the **{% octicon "shield" aria-hidden="true" aria-label="shield" %} {% ifversion security-and-quality-tab %}Security and quality{% else %}Security{% endif %}** tab.
GitHub Code Quality helps users improve code reliability, maintainability, and overall project health by surfacing actionable feedback and offering automatic fixes for findings in pull requests and on the default branch. When Code Quality is enabled, two types of analysis run: CodeQL quality queries identify problems with the maintainability, reliability, or style of code, and LLM-powered analysis provides additional insights beyond what deterministic engines can find. When a quality issue is detected, Copilot Autofix suggests a relevant fix. On pull requests, results are displayed as comments left by the `github-code-quality` bot. On the default branch, LLM-powered findings are displayed in the **AI findings** dashboard under the **{% octicon "shield" aria-hidden="true" aria-label="shield" %} {% ifversion security-and-quality-tab %}Security and quality{% else %}Security{% endif %}** tab. Additionally, Code Quality can automatically generate a code coverage CI workflow for your repository using an AI-powered agent, reducing the manual effort required to set up coverage tracking.

The primary supported language for GitHub Code Security AI features is English.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ intro: 'Search agentic activity in your enterprise with filters for agent sessio
permissions: Enterprise owners
versions:
feature: copilot
redirect_from:
- /copilot/reference/agent-session-filters
contentType: reference
category:
- Track Copilot usage
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ intro: 'Understand the structure of audit log events for agents in your enterpri
permissions: Enterprise owners
versions:
feature: copilot
redirect_from:
- /copilot/reference/agentic-audit-log-events
contentType: reference
category:
- Learn about Copilot
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
---
title: Enterprise managed settings reference
shortTitle: Managed settings reference
intro: 'Reference for the enterprise managed settings schema used by {% data variables.product.prodname_copilot_short %} clients.'
title: Enterprise managed settings
intro: 'Understand the enterprise managed settings schema used by {% data variables.product.prodname_copilot_short %} clients.'
versions:
feature: copilot
contentType: reference
redirect_from:
- /copilot/reference/enterprise-managed-settings-reference
category:
- Configure Copilot
---
Expand Down
14 changes: 14 additions & 0 deletions content/copilot/reference/enterprise-administrators/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
title: Enterprise administrators
intro: Find information to apply to your work as an enterprise administrator for {% data variables.product.prodname_copilot %}.
versions:
feature: copilot
children:
- /agent-session-filters
- /agentic-audit-log-events
- /enterprise-managed-settings
- /mcp-allowlist-enforcement
- /policy-conflicts
contentType: reference
---

Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ intro: 'Understand the logic and limitations of MCP allowlist enforcement.'
versions:
feature: copilot
contentType: reference
redirect_from:
- /copilot/reference/mcp-allowlist-enforcement
category:
- Learn about Copilot
---
Expand Down
Loading
Loading