Skip to content

Commit 6ba0692

Browse files
authored
Merge pull request #43822 from github/repo-sync
Repo sync
2 parents 9a6dfea + 2b5fd07 commit 6ba0692

File tree

15 files changed

+393
-63
lines changed

15 files changed

+393
-63
lines changed

content/code-security/concepts/code-scanning/copilot-autofix-for-code-scanning.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ category:
1515

1616
## How {% data variables.copilot.copilot_autofix_short %} works
1717

18-
{% data variables.copilot.copilot_autofix_short %} translates the description and location of an alert into code changes that may fix the alert. It interfaces with the large language model {% data variables.copilot.copilot_gpt_51 %} from OpenAI, which has sufficient generative capabilities to produce both suggested fixes in code and explanatory text for those fixes.
18+
{% data variables.copilot.copilot_autofix_short %} translates the description and location of an alert into code changes that may fix the alert. It interfaces with the large language model {% data variables.copilot.copilot_gpt_53_codex %} from OpenAI, which has sufficient generative capabilities to produce both suggested fixes in code and explanatory text for those fixes.
1919

2020
## Enabling and managing {% data variables.copilot.copilot_autofix_short %}
2121

content/code-security/responsible-use/responsible-use-autofix-code-scanning.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ category:
2020

2121
{% data reusables.rai.code-scanning.copilot-autofix-note %}
2222

23-
{% data variables.copilot.copilot_autofix_short %} generates potential fixes that are relevant to the existing source code and translates the description and location of an alert into code changes that may fix the alert. {% data variables.copilot.copilot_autofix_short %} uses internal {% data variables.product.prodname_copilot %} APIs interfacing with the large language model {% data variables.copilot.copilot_gpt_51 %} from OpenAI, which has sufficient generative capabilities to produce both suggested fixes in code and explanatory text for those fixes.
23+
{% data variables.copilot.copilot_autofix_short %} generates potential fixes that are relevant to the existing source code and translates the description and location of an alert into code changes that may fix the alert. {% data variables.copilot.copilot_autofix_short %} uses internal {% data variables.product.prodname_copilot %} APIs interfacing with the large language model {% data variables.copilot.copilot_gpt_53_codex %} from OpenAI, which has sufficient generative capabilities to produce both suggested fixes in code and explanatory text for those fixes.
2424

2525
{% data variables.copilot.copilot_autofix_short %} is allowed by default and enabled for every repository using {% data variables.product.prodname_codeql %}, but you can choose to opt out and disable {% data variables.copilot.copilot_autofix_short %}. To learn how to disable {% data variables.copilot.copilot_autofix_short %} at the enterprise, organization and repository levels, see [AUTOTITLE](/code-security/code-scanning/managing-code-scanning-alerts/disabling-autofix-for-code-scanning).
2626

content/copilot/concepts/agents/enterprise-management.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,17 @@ The AI Controls view provides a centralized platform where you can manage and mo
1717
* View and filter a list of agent sessions in your enterprise over the last 24 hours
1818
* Find a detailed record of agentic audit log events
1919

20+
## {% data variables.copilot.copilot_cloud_agent %}
21+
22+
{% data reusables.organizations.copilot-policy-ent-overrides-org %}
23+
24+
Enterprise owners and AI managers can control how {% data variables.copilot.copilot_cloud_agent %} is adopted across the enterprise by choosing one of four policy states. This allows you to pilot adoption progressively and manage risk.
25+
26+
If you choose the **Enabled for selected organizations** policy, you can select organizations individually or based on organization custom properties. This lets you define dynamic groups of organizations that align with your existing organizational structure—for example, by region, compliance tier, or department. You can manage this policy setting using the REST API endpoints or directly in the AI Controls page. See [REST API endpoints for Copilot coding agent management](/rest/copilot/copilot-coding-agent-management#copilot-coding-agent-policy-states). Please note that using custom properties to enable CCA is evaluated once at the time of configuration. Organizations will not be automatically enabled or disabled for CCA if the custom property is added, removed, or modified later.
27+
2028
## {% data variables.copilot.copilot_custom_agents %}
2129

22-
{% data variables.copilot.copilot_custom_agents %} are specialized versions of {% data variables.copilot.copilot_cloud_agent %} that you can configure with tailored prompts, tools, and context, making them excel at specific tasks. {% data variables.copilot.custom_agents_caps_short %} can be defined and managed at the enterprise level for greater control and compliance, or at the organization and repository levels to allow teams the flexibility to build for their specific needs.
30+
{% data variables.copilot.copilot_custom_agents %} are specialized versions of {% data variables.copilot.copilot_cloud_agent %} that you can configure with tailored prompts, tools, and context, making them excel at specific tasks. {% data variables.copilot.custom_agents_caps_short %} can be defined and managed at the enterprise level for greater control and compliance, or at the organization and repository levels to allow teams the flexibility to build for their specific needs.
2331

2432
You can manage your enterprise-level {% data variables.copilot.custom_agents_short %}:
2533
* From the AI Controls view

content/copilot/concepts/policies.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ Enterprise owners can choose to set policies for {% data variables.product.prodn
4242

4343
If a policy is defined at the enterprise level, the policy applies to all users and control of the policy is disabled at the organization level.
4444

45+
### Granular organization selection
46+
47+
**For the {% data variables.copilot.copilot_cloud_agent %} policy**, enterprise owners can choose to enable the feature for specific organizations rather than applying a blanket enterprise-wide setting. When **Enabled for selected organizations** is selected by an enterprise owner or an AI manager, only the selected organizations can enable the feature. Organizations can be selected individually or by using organization custom properties.
48+
4549
### No policy
4650

4751
If an enterprise owner selects **No policy**, the impact depends on whether a user has access to {% data variables.product.prodname_copilot_short %} through an organization or directly from the enterprise.

content/copilot/how-tos/administer-copilot/manage-for-enterprise/manage-agents/manage-copilot-cloud-agent.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Managing GitHub Copilot cloud agent in your enterprise
33
intro: 'Enable members of your enterprise to use {% data variables.copilot.copilot_cloud_agent %} and control the repositories where it is available.'
44
allowTitleToDifferFromFilename: true
5-
permissions: Enterprise owners
5+
permissions: Enterprise owners and AI managers
66
product: '{% data reusables.gated-features.copilot-cloud-agent %}<br><a href="https://github.com/enterprise/contact?ref_product=copilot&ref_type=engagement&ref_style=button" target="_blank" class="btn btn-primary mt-3 mr-3 no-underline"><span>Contact Sales</span> {% octicon "link-external" height:16 %}</a>'
77
versions:
88
feature: copilot
@@ -34,16 +34,20 @@ category:
3434

3535
{% data variables.copilot.copilot_cloud_agent %} and use of third-party MCP servers are blocked by default for users to whom you have assigned a {% data variables.product.prodname_copilot_short %} license. You can allow members to use these features from the AI Controls tab for your enterprise. See [AUTOTITLE](/copilot/managing-copilot/managing-copilot-for-your-enterprise/managing-policies-and-features-for-copilot-in-your-enterprise#configuring-policies-for-github-copilot).
3636

37-
* On the "Agents" page, click **{% data variables.copilot.copilot_cloud_agent %}**, then select **Enabled everywhere** or **Let organizations decide**.
37+
* On the "Agents" page, click **{% data variables.copilot.copilot_cloud_agent %}**, then select **Enabled everywhere**, **Let organizations decide**, or **Enable for selected organizations**.
3838
* On the "MCP" page, for the "MCP servers in {% data variables.product.prodname_copilot_short %}" policy, select **Enabled everywhere** or **Let organizations decide**.
3939

4040
### Next steps
4141

4242
* If you selected **Enabled everywhere**, tell organization owners that {% data variables.copilot.copilot_cloud_agent %} is enabled for all members. By default, the agent will be available in all repositories, but it is possible to opt out some or all repositories.
4343
* If you selected **Let organizations decide**, discuss member enablement with organization owners.
44+
* If you selected **Enable for selected organizations** ({% data variables.copilot.copilot_cloud_agent %} only), tell the owners of the selected organizations that {% data variables.copilot.copilot_cloud_agent %} is enabled for their members. Organizations that aren't selected will not have access.
4445

4546
For more information, see [AUTOTITLE](/copilot/how-tos/administer-copilot/manage-for-organization/add-copilot-cloud-agent).
4647

48+
> [!NOTE]
49+
> When the {% data variables.copilot.copilot_cloud_agent %} policy is set to **Enabled for selected organizations**, you can select individual organizations in the UI. To select organizations based on custom properties instead, use the REST API. See [AUTOTITLE](/admin/managing-accounts-and-repositories/managing-organizations-in-your-enterprise/custom-properties) and [AUTOTITLE](/rest/copilot/copilot-coding-agent-management#selecting-organizations-with-custom-properties).
50+
4751
## Disabling {% data variables.copilot.copilot_cloud_agent %} in your repositories
4852

4953
{% data variables.product.prodname_copilot_short %} policies, like the "{% data variables.copilot.copilot_cloud_agent %}" and "MCP servers on {% data variables.product.prodname_dotcom_the_website %}" policies described above, affect only the users you assign a {% data variables.product.prodname_copilot_short %} license to.

content/copilot/tutorials/use-custom-instructions.md renamed to content/copilot/tutorials/customize-code-review.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
---
22
title: Using custom instructions to unlock the power of Copilot code review
33
shortTitle: Customize code review
4-
intro: 'Learn how to write effective custom instructions that help {% data variables.product.prodname_copilot %} provide more relevant and actionable code reviews.'
4+
intro: Learn how to write effective custom instructions that help {% data variables.product.prodname_copilot %} provide more relevant and actionable code reviews.
55
versions:
66
feature: copilot
77
contentType: tutorials
88
category:
99
- Accelerate PR velocity
1010
- Team collaboration
1111
- Configure Copilot
12+
redirect_from:
13+
- /copilot/tutorials/use-custom-instructions
1214
---
1315

1416
## Introduction

content/copilot/tutorials/index.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
---
2-
title: 'Tutorials for {% data variables.product.prodname_copilot %}'
2+
title: Tutorials for {% data variables.product.prodname_copilot %}
33
shortTitle: Tutorials
4-
intro: 'Build skills and knowledge about {% data variables.product.prodname_copilot %} through examples and hands-on activities.'
4+
intro: Build skills and knowledge about {% data variables.product.prodname_copilot %} through examples and hands-on activities.
55
versions:
66
feature: copilot
77
children:
88
- /copilot-chat-cookbook
99
- /customization-library
1010
- /cloud-agent
1111
- /spark
12-
- /use-custom-instructions
12+
- /customize-code-review
1313
- /enhance-agent-mode-with-mcp
1414
- /compare-ai-models
1515
- /speed-up-development-work
@@ -54,3 +54,4 @@ includedCategories:
5454
- Modernize applications
5555
- Roll Copilot out at scale
5656
---
57+
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{% data variables.product.prodname_copilot_short %} policies are also managed at the enterprise level. If your organization is part of an enterprise, and explicit settings have been selected at the enterprise level, you cannot override those settings at the organization level. For information on how policies combine, see [AUTOTITLE](/copilot/concepts/policies).
1+
{% data variables.product.prodname_copilot_short %} policies are also managed at the enterprise level. If your enterprise owner has selected a specific policy, such as enabling a feature everywhere, disabling it everywhere, or enabling it for selected organizations only, you cannot override that setting at the organization level. For information on how policies combine, see [AUTOTITLE](/copilot/concepts/policies).

src/article-api/lib/get-all-toc-items.ts

Lines changed: 41 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
import type { Context, Page } from '@/types'
22
import type { LinkData } from '@/article-api/transformers/types'
33
import { resolvePath } from './resolve-path'
4+
import { renderLiquid } from '@/content-render/liquid/index'
45

56
interface PageWithChildren extends Page {
67
children?: string[]
78
category?: string[]
9+
rawTitle: string
10+
rawIntro?: string
811
}
912

1013
interface TocItem extends LinkData {
@@ -26,14 +29,11 @@ export async function getAllTocItems(
2629
page: Page,
2730
context: Context,
2831
options: {
29-
recurse?: boolean
30-
renderIntros?: boolean
3132
/** Only recurse into children whose resolved path starts with this prefix.
3233
* Prevents cross-product traversal (e.g. /en/rest listing /enterprise-admin). */
3334
basePath?: string
3435
} = {},
3536
): Promise<TocItem[]> {
36-
const { recurse = true, renderIntros = true } = options
3737
const pageWithChildren = page as PageWithChildren
3838
const languageCode = page.languageCode || 'en'
3939

@@ -70,19 +70,15 @@ export async function getAllTocItems(
7070
)
7171
const href = childPermalink ? childPermalink.href : childHref
7272

73-
const title = await childPage.renderTitle(context, { unwrap: true })
74-
75-
let intro = ''
76-
if (renderIntros && childPage.intro) {
77-
intro = await childPage.renderProp('intro', context, { textOnly: true })
78-
}
73+
const title = await renderPropFast(childPage, 'title', context)
74+
const intro = await renderPropFast(childPage, 'intro', context)
7975

8076
const category = childPage.category || []
8177

8278
// Only recurse if the child is within the same product section
8379
const withinSection = href.startsWith(basePath)
8480
const childTocItems =
85-
recurse && withinSection && childPage.children && childPage.children.length > 0
81+
withinSection && childPage.children && childPage.children.length > 0
8682
? await getAllTocItems(childPage, context, { ...options, basePath })
8783
: []
8884

@@ -139,3 +135,38 @@ export function flattenTocItems(
139135
recurse(tocItems)
140136
return result
141137
}
138+
139+
/**
140+
* Check whether a string contains markdown link syntax that would need
141+
* processing by the unified pipeline (e.g. link rewriting, AUTOTITLE).
142+
*
143+
* Use this to short-circuit expensive rendering when the text is
144+
* Liquid-only and contains no markdown that needs transformation.
145+
*/
146+
function hasMarkdownLinks(text: string): boolean {
147+
return text.includes('[') && text.includes('](/')
148+
}
149+
150+
const RAW_PROP_MAP = {
151+
title: 'rawTitle',
152+
intro: 'rawIntro',
153+
} as const
154+
155+
/**
156+
* Fast-path rendering for page properties. Renders Liquid only, skipping
157+
* the full unified pipeline. Falls back to page.renderProp() when the
158+
* Liquid output contains markdown links that need rewriting.
159+
*/
160+
async function renderPropFast(
161+
page: PageWithChildren,
162+
prop: keyof typeof RAW_PROP_MAP,
163+
context: Context,
164+
): Promise<string> {
165+
const raw = page[RAW_PROP_MAP[prop]]
166+
if (!raw) return ''
167+
const rendered = await renderLiquid(raw, context)
168+
if (hasMarkdownLinks(rendered)) {
169+
return page.renderProp(prop, context, { textOnly: true })
170+
}
171+
return rendered.trim()
172+
}

src/article-api/transformers/bespoke-landing-transformer.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,7 @@ export class BespokeLandingTransformer implements PageTransformer {
9595
// Note: For bespoke-landing pages, the site shows ALL articles regardless of includedCategories
9696
// (includedCategories only filters for discovery-landing pages)
9797
if (bespokePage.children && bespokePage.children.length > 0) {
98-
const tocItems = await getAllTocItems(page, context, {
99-
recurse: true,
100-
renderIntros: true,
101-
})
98+
const tocItems = await getAllTocItems(page, context)
10299

103100
// Flatten to get all leaf articles (excludeParents: true means only get articles, not category pages)
104101
const allArticles = flattenTocItems(tocItems, { excludeParents: true })

0 commit comments

Comments
 (0)