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
3 changes: 2 additions & 1 deletion .github/workflows/auto-add-ready-for-doc-review.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Auto-add ready-for-doc-review label

# Sends DIY content changes to the docs-content review board without manual labeling.
# Doc It PRs reach the review queue through the Doc It controller.

on:
pull_request:
Expand All @@ -18,7 +19,7 @@ permissions:
jobs:
add-review-label:
name: Add ready-for-doc-review label to DIY docs PRs
if: github.repository == 'github/docs-internal' && github.event.pull_request.draft == false && github.actor != 'github-openapi-bot' && github.actor != 'docs-bot'
if: github.repository == 'github/docs-internal' && github.event.pull_request.draft == false && github.actor != 'github-openapi-bot' && github.actor != 'docs-bot' && !contains(github.event.pull_request.body, 'This pull request was generated by Doc It v2')
runs-on: ubuntu-latest

steps:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ This detector is separate from {% data variables.product.prodname_codeql %}-base

The detector analyzes pull requests for code patterns and data flows that can expose AI applications to indirect prompt injection, sensitive information disclosure, or excessive agency.

Scans run when a pull request is created and after each new commit.
Scans run when a pull request that targets the repository's default branch or a protected branch is created, and after each new push to those branches. For more information, see [AUTOTITLE](/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/about-protected-branches) and [AUTOTITLE](/repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets/about-rulesets).

## How findings appear on pull requests

Expand All @@ -49,7 +49,7 @@ During {% data variables.release-phases.public_preview %}, {% data variables.pro

This detector covers pull requests only. It doesn't scan your full repository or existing backlog for AI application risks.

As with {% data variables.product.prodname_ai_scan_for_pull_requests %}, this detector doesn't run on pull requests from forks or pull requests created by {% data variables.product.prodname_dependabot %}, and its findings can't be used in rulesets to enforce merge requirements.
As with {% data variables.product.prodname_ai_scan_for_pull_requests %}, this detector only runs on pull requests that target the default branch or a protected branch. It doesn't run on pull requests from forks or pull requests created by {% data variables.product.prodname_dependabot %}, and its findings can't be used in rulesets to enforce merge requirements.

## How to enable {% data variables.product.prodname_ai_applications_scanning %}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ For details about the billing model, see [AUTOTITLE](/billing/concepts/product-b

* {% data variables.product.prodname_code_scanning_caps %} is enabled for the repository.
* The repository's {% data variables.product.prodname_ai_scan %} on pull requests setting is enabled.
* A pull request that is not from a fork or created by {% data variables.product.prodname_dependabot %} contains changes in a supported language or framework that {% data variables.product.prodname_codeql %} does not cover.
* A pull request that is not from a fork or created by {% data variables.product.prodname_dependabot %} targets the repository's default branch or a protected branch, and contains changes in a supported language or framework that {% data variables.product.prodname_codeql %} does not cover. For more information, see [AUTOTITLE](/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/about-protected-branches) and [AUTOTITLE](/repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets/about-rulesets).

Scans run when a pull request is created and after each new commit, as they do for {% data variables.product.prodname_codeql %}.

Expand All @@ -68,6 +68,7 @@ You can use the thumbs up or thumbs down control to provide feedback and help im

* {% data variables.product.prodname_ai_scan %} findings cannot yet be used in rulesets to enforce merge requirements.
* {% data variables.product.prodname_ai_scan %} does not run on pull requests from forks or pull requests created by {% data variables.product.prodname_dependabot %}.
* {% data variables.product.prodname_ai_scan %} only runs on pull requests that target the repository's default branch or a protected branch.
* Self-hosted runners are not supported.
* Detection categories and supported languages may change as the feature evolves.
* As with any AI-based tool, {% data variables.product.prodname_ai_scan %} findings may include false positives. Use the feedback mechanism to report inaccurate results.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,24 @@ category:

By default, if organization members, or collaborators, are permitted to create codespaces that are billable to your organization, they can create multiple such codespaces. The number of organization-billed codespaces someone can create is governed by a limit to the total number of codespaces that they can create across all repositories they can access. This limit is set by {% data variables.product.company_short %}.

As an organization owner, you can restrict the number of codespaces that each user can create, where the costs of the codespace are billable to the organization. This can help to reduce the overall cost of {% data variables.product.prodname_github_codespaces %} to the organization, as there is a charge for codespace storage. For more information, see [AUTOTITLE](/billing/concepts/product-billing/github-codespaces).
As an organization owner, you can use the "Maximum total codespaces per user" constraint to limit the total number of codespaces that each user can have billed to your organization, including both running and stopped codespaces. This can help to reduce the overall cost of {% data variables.product.prodname_github_codespaces %} to the organization, as there is a charge for codespace storage. For more information, see [AUTOTITLE](/billing/concepts/product-billing/github-codespaces).

To restrict the maximum number of organization-billed codespaces that users can create, you create a policy in the {% data variables.product.prodname_codespaces %} settings for your organization. For example, if you set the maximum to 2, users who already have 2 active or stopped codespaces that are billed to your organization will have to delete one of these before they can create a new codespace that's billed to the organization.
{% data variables.product.company_short %} sets a separate limit on how many codespaces a user can run at the same time. The "Maximum total codespaces per user" constraint does not change this separate limit, but a lower total limit can still reduce the number of organization-billed codespaces the user can run.

To restrict the maximum number of organization-billed codespaces that users can create, you create a policy in the {% data variables.product.prodname_codespaces %} settings for your organization. For example, if you set the maximum to 2, users who already have 2 running or stopped codespaces that are billed to your organization will have to delete one of these before they can create a new codespace that's billed to the organization.

This setting does not restrict users from creating codespaces that are not billed to your organization. For example, they can create additional codespaces for public repositories, using their personal {% data variables.product.prodname_codespaces %} usage allowance. However, users who are permitted to create organization-billed codespaces, but have reached the limit for such codespaces, cannot choose to create a codespace for an organization-owned repository using their personal included allowance.

For information about the free use of {% data variables.product.prodname_github_codespaces %} for personal accounts, see [AUTOTITLE](/billing/concepts/product-billing/github-codespaces#free-and-billed-use-by-personal-accounts). For information on how to choose who can create codespaces that are billed to your organization, see [AUTOTITLE](/codespaces/managing-codespaces-for-your-organization/enabling-or-disabling-github-codespaces-for-your-organization).

Policies with the "Maximum codespaces per user" constraint are applied to every repository in your organization. You can't, therefore, add this constraint to an existing policy that is configured to apply only to selected repositories.
Policies with the "Maximum total codespaces per user" constraint are applied to every repository in your organization. You can't, therefore, add this constraint to an existing policy that is configured to apply only to selected repositories.

## Adding a policy to define the maximum codespaces per user

{% data reusables.profile.access_org %}
{% data reusables.profile.org_settings %}
{% data reusables.codespaces.codespaces-org-policies %}
1. Click **Add constraint** and choose **Maximum codespaces per user**.
1. Click **Add constraint** and choose **Maximum total codespaces per user**.
1. Click {% octicon "pencil" aria-label="Edit policy" %} to edit the constraint.
1. In the "Maximum value" field, enter the maximum number of organization-billed codespaces that each user can create.

Expand All @@ -46,7 +48,7 @@ Policies with the "Maximum codespaces per user" constraint are applied to every
* [AUTOTITLE](/codespaces/managing-codespaces-for-your-organization/restricting-the-retention-period-for-codespaces)

> [!NOTE]
> When you add a constraint to a policy that already contains the "Maximum codespaces per user" constraint, you won't be able to restrict the additional constraint to specific repositories, as the "Maximum codespaces per user" constraint applies to all repositories in the organization.
> When you add a constraint to a policy that already contains the "Maximum total codespaces per user" constraint, you won't be able to restrict the additional constraint to specific repositories, as the "Maximum total codespaces per user" constraint applies to all repositories in the organization.

1. After you've finished adding constraints to your policy, click **Save**.

Expand All @@ -58,7 +60,7 @@ You can edit an existing policy. For example, you may want to add or remove cons

1. Display the "Codespaces policies" page. For more information, see [Adding a policy to define the maximum codespaces per user](#adding-a-policy-to-define-the-maximum-codespaces-per-user).
1. Click the name of the policy you want to edit.
1. Beside the "Maximum codespaces per user" constraint, click {% octicon "pencil" aria-label="Edit policy" %}.
1. Beside the "Maximum total codespaces per user" constraint, click {% octicon "pencil" aria-label="Edit policy" %}.
1. Edit the maximum number of codespaces.
1. Click **Save**.

Expand Down
8 changes: 6 additions & 2 deletions content/copilot/concepts/models/copilot-fusion.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ category:
- Build agents at enterprise scale
---

<!-- expires 2026-12-31 -->
{% data reusables.copilot.fusion-promotional-discount %}
<!-- end expires 2026-12-31 -->

## Overview

{% data variables.copilot.copilot_fusion_short %} is an intelligent runtime model router and orchestrator. It chooses models and execution patterns for your task, then returns a single response. For example, it can choose one model to draft a solution and a separate model for review.
Expand Down Expand Up @@ -125,9 +129,9 @@ If none of the models {% data variables.copilot.copilot_fusion_short %} uses are

## Billing for {% data variables.copilot.copilot_fusion_short %}

<!-- expires 2026-11-30 -->
<!-- expires 2026-12-31 -->
{% data reusables.copilot.fusion-promotional-discount %}
<!-- end expires 2026-11-30 -->
<!-- end expires 2026-12-31 -->

When you use {% data variables.copilot.copilot_fusion_short %}, you're billed for each model it uses, at that model's standard rate. There's no separate charge for {% data variables.copilot.copilot_fusion_short %}. Because {% data variables.copilot.copilot_fusion_high %} and {% data variables.copilot.copilot_fusion_max %} can use more than one model for a task, a task may consume more {% data variables.product.prodname_ai_credits_short %} than it would with {% data variables.copilot.copilot_fusion_standard %}. For per-model rates, see [AUTOTITLE](/copilot/reference/copilot-billing/models-and-pricing).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,12 +185,12 @@ You can manage sessions with slash commands from inside any session:
| `/session` | Open the **Sessions** tab. |
| `/session info` | Show details about the current session. |
| `/session id` | Show the current session ID and copy it to the clipboard. |
| `/session files` | List the files changed in this session. |
| `/session files` | List the files {% data variables.product.prodname_copilot_short %} has saved for this session that are not part of your project, such as notes, diagrams, or task lists. These files are stored in the session's `files` folder, at `~/.copilot/session-state/SESSION-ID/files`. |
| `/session plan` | Show the current plan. |
| `/session checkpoints [N]` | Show the session's checkpoints. |
| `/session cleanup`, `/session prune` | Housekeeping for old or stale session data. |
| `/session delete [ID]`, `/session delete-all` | Delete a session, or all of them. |
| `/exit`, `/quit` | Close the current session. If others are open, the nearest remaining one in the sidebar order comes to the foreground. The CLI quits only when you close the last session. |
| `/exit`, `/quit` | Close the current session or quit the CLI, as described in [Stopping a session](#stopping-a-session). When only the current session closes, the nearest remaining one in the sidebar order comes to the foreground. |

## Customizing the sidebar

Expand Down
2 changes: 1 addition & 1 deletion data/reusables/codespaces/codespaces-policy-targets.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
![Screenshot of the repository selection dropdown, showing the options "All repositories" and "Selected repositories."](/assets/images/help/codespaces/selected-repositories.png)

> [!NOTE]
> If you're adding a constraint to an existing policy that already contains the "Maximum codespaces per user" constraint, you won't be able to apply the policy to selected repositories. This is because the "Maximum codespaces per user" constraint always applies to all repositories in the organization.
> If you're adding a constraint to an existing policy that already contains the "Maximum total codespaces per user" constraint, you won't be able to apply the policy to selected repositories. This is because the "Maximum total codespaces per user" constraint always applies to all repositories in the organization.

With **Selected repositories** selected:
1. Click {% octicon "gear" aria-label="The settings icon" %}.
Expand Down
2 changes: 1 addition & 1 deletion data/reusables/copilot/fusion-promotional-discount.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
> [!NOTE]
> Through November 30, 2026, users on paid {% data variables.product.prodname_copilot_short %} plans receive a 30% discount on model costs when using {% data variables.copilot.copilot_fusion_short %}.
> Through December 31, 2026, users on paid {% data variables.product.prodname_copilot_short %} plans receive a 30% discount on model costs when using {% data variables.copilot.copilot_fusion_short %}.
112 changes: 112 additions & 0 deletions src/workflows/tests/auto-add-ready-for-doc-review.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
import fs from 'node:fs'
import { runInNewContext } from 'node:vm'

import { load } from 'js-yaml'
import { describe, expect, test } from 'vitest'

const workflow = load(
fs.readFileSync('.github/workflows/auto-add-ready-for-doc-review.yml', 'utf8'),
) as {
on: { pull_request: { types: string[] } }
jobs: { 'add-review-label': { if: string } }
}

interface PullRequestContext {
body?: string | null
author?: string
actor?: string
draft?: boolean
repository?: string
}

function shouldRun(action: string, context: PullRequestContext) {
return runInNewContext(workflow.jobs['add-review-label'].if, {
github: {
repository: context.repository ?? 'github/docs-internal',
actor: context.actor ?? context.author ?? 'contributor',
event: {
action,
pull_request: {
body: context.body,
draft: context.draft ?? false,
user: { login: context.author ?? 'contributor' },
},
},
},
contains: (value: string | null | undefined, search: string) =>
(value ?? '').toLowerCase().includes(search.toLowerCase()),
})
}

describe('auto-add ready-for-doc-review', () => {
test('handles opened and ready_for_review events', () => {
expect(workflow.on.pull_request.types).toEqual(['opened', 'ready_for_review'])
})

describe.each(['opened', 'ready_for_review'])('%s', (action) => {
test.each<{ name: string; context: PullRequestContext; expected: boolean }>([
{
name: 'excludes Doc It PRs from the current Copilot identity',
context: {
author: 'Copilot',
body: 'Summary\n\nThis pull request was generated by Doc It v2.\n\nDetails',
},
expected: false,
},
{
name: 'excludes Doc It PRs from the legacy Copilot identity',
context: {
author: 'copilot-swe-agent[bot]',
body: 'This pull request was generated by Doc It v2',
},
expected: false,
},
{
name: 'excludes Doc It PRs promoted by a human',
context: {
author: 'Copilot',
actor: 'contributor',
body: 'This pull request was generated by Doc It v2',
},
expected: false,
},
{
name: 'keeps ordinary human PRs',
context: { body: 'Update the documentation' },
expected: true,
},
{
name: 'keeps unrelated Copilot PRs',
context: { author: 'Copilot', body: 'Update the documentation' },
expected: true,
},
{
name: 'keeps unrelated legacy Copilot PRs',
context: { author: 'copilot-swe-agent[bot]', body: 'Update the documentation' },
expected: true,
},
{
name: 'keeps PRs mentioning Doc It without the provenance marker',
context: { body: 'Document the Doc It v2 workflow' },
expected: true,
},
{ name: 'keeps null bodies', context: { body: null }, expected: true },
{ name: 'keeps missing bodies', context: {}, expected: true },
{ name: 'keeps empty bodies', context: { body: '' }, expected: true },
{ name: 'excludes drafts', context: { draft: true }, expected: false },
{
name: 'excludes the public repository',
context: { repository: 'github/docs' },
expected: false,
},
{
name: 'excludes github-openapi-bot',
context: { actor: 'github-openapi-bot' },
expected: false,
},
{ name: 'excludes docs-bot', context: { actor: 'docs-bot' }, expected: false },
])('$name', ({ context, expected }) => {
expect(shouldRun(action, context)).toBe(expected)
})
})
})
Loading