From e325487d1165f65a39652ff500b12656051b48ea Mon Sep 17 00:00:00 2001 From: Pallavi <96553709+pallsama@users.noreply.github.com> Date: Thu, 27 Aug 2026 19:23:27 +0000 Subject: [PATCH 1/4] Add Copilot CLI docs for GHES 3.22 (#62875) Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Co-authored-by: Anne-Marie <102995847+am-stead@users.noreply.github.com> Copilot-Session: 4315fbb0-473e-4a28-ab44-7a789579427c --- .../admin/github-copilot/copilot-cli/index.md | 11 ++ .../copilot-cli/set-up-and-use-copilot-cli.md | 158 ++++++++++++++++++ content/admin/github-copilot/index.md | 8 + content/admin/index.md | 2 +- data/features/copilot-cli-ghes.yml | 4 + 5 files changed, 182 insertions(+), 1 deletion(-) create mode 100644 content/admin/github-copilot/copilot-cli/index.md create mode 100644 content/admin/github-copilot/copilot-cli/set-up-and-use-copilot-cli.md create mode 100644 content/admin/github-copilot/index.md create mode 100644 data/features/copilot-cli-ghes.yml diff --git a/content/admin/github-copilot/copilot-cli/index.md b/content/admin/github-copilot/copilot-cli/index.md new file mode 100644 index 000000000000..fde325d3cb73 --- /dev/null +++ b/content/admin/github-copilot/copilot-cli/index.md @@ -0,0 +1,11 @@ +--- +title: GitHub Copilot CLI +shortTitle: '{% data variables.copilot.copilot_cli_short %}' +intro: Configure {% data variables.copilot.copilot_cli_short %} to work with {% data variables.product.prodname_ghe_server %}. +versions: + feature: copilot-cli-ghes +children: + - /set-up-and-use-copilot-cli +docsTeamMetrics: + - copilot-cli +--- diff --git a/content/admin/github-copilot/copilot-cli/set-up-and-use-copilot-cli.md b/content/admin/github-copilot/copilot-cli/set-up-and-use-copilot-cli.md new file mode 100644 index 000000000000..ea3f7beed4ab --- /dev/null +++ b/content/admin/github-copilot/copilot-cli/set-up-and-use-copilot-cli.md @@ -0,0 +1,158 @@ +--- +title: Set up and use GitHub Copilot CLI +shortTitle: 'Set up and use {% data variables.copilot.copilot_cli_short %}' +intro: Configure a model provider for your {% data variables.product.prodname_ghe_server %} instance, then connect {% data variables.copilot.copilot_cli_short %} clients to the instance. +allowTitleToDifferFromFilename: true +versions: + feature: copilot-cli-ghes +contentType: how-tos +category: + - Configure Copilot CLI +docsTeamMetrics: + - copilot-cli +--- + +> [!NOTE] +> This feature is in {% data variables.release-phases.technical_preview %} and subject to change. + +You can configure {% data variables.copilot.copilot_cli_short %} to work with {% data variables.product.prodname_ghe_server %} in disconnected or air-gapped environments without connectivity to {% data variables.product.github %} Cloud. An administrator configures a model provider for the instance, and users connect {% data variables.copilot.copilot_cli_short %} with their {% data variables.product.prodname_ghe_server %} credentials. + +Setting up this feature involves two roles: + +* **Administrator**: Configures the model provider on the {% data variables.product.prodname_ghe_server %} instance using `ghe-config`. This is a one-time setup that requires administrative SSH access. +* **End user**: Sets environment variables on a local machine to connect {% data variables.copilot.copilot_cli_short %} to the instance. + +## Prerequisites + +* You have administrative SSH access to the {% data variables.product.prodname_ghe_server %} instance. +* You have an API key from a supported LLM provider. +* {% data variables.copilot.copilot_cli_short %} is installed on client machines. See [AUTOTITLE](/enterprise-cloud@latest/copilot/how-tos/copilot-cli/set-up-copilot-cli/install-copilot-cli). +* {% data variables.product.prodname_cli %} (`gh`) is installed on client machines. See [{% data variables.product.prodname_cli %} manual](https://cli.github.com/manual/) in the {% data variables.product.prodname_cli %} documentation. + +For information about supported providers and model requirements, see [AUTOTITLE](/enterprise-cloud@latest/copilot/how-tos/copilot-cli/customize-copilot/use-byok-models). + +## Configuring your {% data variables.product.prodname_ghe_server %} instance + +This step is for the operator or administrator of the {% data variables.product.prodname_ghe_server %} instance. + +With administrative SSH access to the {% data variables.product.prodname_ghe_server %} instance, configure the model provider using the following `ghe-config` values. After configuring, run `ghe-config-apply` to apply the changes. + +| Variable name | Required | Options | Description | +|---|---|---|---| +| `app.copilot-proxy.enabled` | Yes | `true`, `false` | Enables or disables the feature. | +| `app.copilot-proxy.endpoint-url` | Yes | URI | The full upstream base URL including any version prefix (for example, `https://api.openai.com/v1`). | +| `secrets.copilot-proxy.endpoint-key` | Yes | String | The API key for the upstream provider. | +| `app.copilot-proxy.provider-model-id` | Yes | String | The provider model ID that {% data variables.copilot.copilot_cli_short %} uses to look up the model internally. | +| `app.copilot-proxy.provider-type` | Yes | `openai`, `azure`, `anthropic` | The provider type. OpenAI includes OpenAI, Ollama, vLLM, Foundry Local, and any other OpenAI Chat Completions API-compatible endpoint. | +| `app.copilot-proxy.upstream-timeout` | No | Integer, in seconds | Read/send timeout in seconds for upstream requests. If not set, falls back to the default timeout. | +| `app.copilot-proxy.provider-wire-api` | No | `completions`, `responses` | The wire API format for the provider. | +| `app.copilot-proxy.provider-wire-model` | No | String | Overrides the model identifier sent to the upstream provider if it differs from the internal model ID. | +| `app.copilot-proxy.enable-upstream-probe` | No | `true`, `false` | Enables or disables the startup upstream probe. Defaults to enabled. When disabled, the startup probe is skipped. | + +For example, the following commands configure an OpenAI provider. + +```shell +ghe-config app.copilot-proxy.enabled true +ghe-config app.copilot-proxy.endpoint-url 'https://api.openai.com/v1' +ghe-config secrets.copilot-proxy.endpoint-key 'YOUR-API-KEY' +ghe-config app.copilot-proxy.provider-model-id 'gpt-5.5' +ghe-config app.copilot-proxy.provider-wire-model 'gpt-5.5' +ghe-config app.copilot-proxy.provider-type openai +ghe-config app.copilot-proxy.upstream-timeout 300 +ghe-config app.copilot-proxy.enable-upstream-probe false +ghe-config-apply +``` + +Replace `YOUR-API-KEY` with the real API key before applying the configuration. + +## Configuring your {% data variables.copilot.copilot_cli_short %} client (end user) + +Configure {% data variables.copilot.copilot_cli_short %} to connect to your {% data variables.product.prodname_ghe_server %} instance by setting the following environment variables before starting {% data variables.copilot.copilot_cli_short %}. + +| Environment variable | Required | Description | +|---|---|---| +| `COPILOT_PROVIDER_GHES_HOST` | Yes | The hostname of your {% data variables.product.prodname_ghe_server %} instance. | +| `COPILOT_PROVIDER_GHES_TOKEN` | Yes | A {% data variables.product.pat_generic %} for the {% data variables.product.prodname_ghe_server %} instance. This token authenticates requests to the instance. | +| `COPILOT_OFFLINE` | Yes | Enables offline mode. The {% data variables.product.prodname_ghe_server %} provider is only active when offline mode is enabled. | + +## Understanding client (end user) tokens + +{% data variables.copilot.copilot_cli_short %} needs access to LLM inference, so `COPILOT_PROVIDER_GHES_TOKEN` is always required. You will also very likely want {% data variables.copilot.copilot_cli_short %} to perform {% data variables.product.github %} operations such as create issues, pull requests, and search repositories. Such operations can be done via the {% data variables.product.prodname_cli %}. + +It is recommended and preferred that you run `gh auth login --hostname YOUR-GHES-HOSTNAME`. After it succeeds, next step is to set `COPILOT_PROVIDER_GHES_TOKEN` to the token generated in `gh auth login --hostname YOUR-GHES-HOSTNAME`. It is more secure to retrieve the token dynamically rather than copying it from `~/.config/gh/hosts.yml`. You can do so by using `COPILOT_PROVIDER_GHES_TOKEN="$(gh auth token --hostname YOUR-GHES-HOSTNAME)"`. + +Alternatively, you can generate a {% data variables.product.pat_generic %} on your {% data variables.product.prodname_ghe_server %} instance, set that token as `COPILOT_PROVIDER_GHES_TOKEN`, and use the same token when running `gh auth login --hostname YOUR-GHES-HOSTNAME`. + +The above approach works when you are using {% data variables.copilot.copilot_cli_short %} interactively. For automation, you need to do a few things differently: +* Set `GH_ENTERPRISE_TOKEN` (or `GITHUB_ENTERPRISE_TOKEN`) to the {% data variables.product.pat_generic %}. +* Set `GH_HOST` to your server's hostname. +* When both `GH_ENTERPRISE_TOKEN` and `gh auth login` credentials exist for the same host, the environment variable takes precedence. + +## Recommended end user setup + +1. Authenticate {% data variables.product.prodname_cli %}. + + ```shell + gh auth login --hostname YOUR-GHES-HOSTNAME + ``` + +1. Set the environment variables required by {% data variables.copilot.copilot_cli_short %}. + + ```shell + export COPILOT_PROVIDER_GHES_HOST=YOUR-GHES-HOSTNAME + export COPILOT_PROVIDER_GHES_TOKEN="$(gh auth token --hostname YOUR-GHES-HOSTNAME)" + export COPILOT_OFFLINE=true + ``` + + If you are authenticated with `gh auth login` to multiple accounts, you can set `GH_HOST` to your server's hostname and set `GH_ENTERPRISE_TOKEN` (or `GITHUB_ENTERPRISE_TOKEN`) to `"$(gh auth token --hostname YOUR-GHES-HOSTNAME)"`. This ensures {% data variables.product.prodname_cli %} targets your {% data variables.product.prodname_ghe_server %} instance. + + ```shell + export GH_HOST=YOUR-GHES-HOSTNAME + export GH_ENTERPRISE_TOKEN="$(gh auth token --hostname YOUR-GHES-HOSTNAME)" + ``` + +{% data reusables.copilot.copilot-cli.start-cli %} + +You can run this entire set-up as a script. + +## Examples + +If both {% data variables.product.prodname_ghe_server %} and your {% data variables.copilot.copilot_cli_short %} configurations are correct, then you should see responses like the following in your {% data variables.copilot.copilot_cli_short %} session. + +```shell + • fabric-core-mcp — disabled + • powerbi-mcp — disabled + • slack — connected + + ● Current model: gpt-5.5 + + ❯ Hello 13:31 + + ● Hello! + + ❯ what is going on in github/codeql-action repo? 13:33 + + ● I’ll check recent repository activity on the GHES host: repo metadata, open + PRs/issues, and latest commits. + + $ Shell Fetch repo metadata 2 lines… 5s + gh api --hostname "$GH_HOST" repos/github/codeql-action --jq '{name_with_own… +``` + +## Supported capabilities on {% data variables.product.prodname_ghe_server %} + +For the most up-to-date information on {% data variables.copilot.copilot_cli_short %} features, refer to [AUTOTITLE](/enterprise-cloud@latest/copilot/how-tos/copilot-cli) as the primary source of truth. In general, any capability that relies on connectivity to {% data variables.product.github %} cloud services is not available in the {% data variables.product.prodname_ghe_server %} offline configuration. + +The following table provides a directional overview of what is available in {% data variables.product.prodname_ghe_server %} offering. + +| Capability | {% data variables.product.prodname_dotcom %} / {% data variables.product.prodname_ghe_cloud %} | {% data variables.product.prodname_ghe_server %} | +|:---|:---:|:---:| +| AI-assisted coding (prompts, code generation, debugging) | {% octicon "check" aria-label="Available" %} | {% octicon "check" aria-label="Available" %} | +| Shell commands and file operations | {% octicon "check" aria-label="Available" %} | {% octicon "check" aria-label="Available" %} | +| {% data variables.product.github %} operations (issues, PRs, repos) via `gh` CLI | {% octicon "check" aria-label="Available" %} | {% octicon "check" aria-label="Available" %} (requires `gh` CLI authenticated to the instance) | +| {% data variables.product.github %} MCP server tools | {% octicon "check" aria-label="Available" %} | {% octicon "x" aria-label="Not available" %} | +| Web search and web fetch | {% octicon "check" aria-label="Available" %} | {% octicon "x" aria-label="Not available" %} | +| {% data variables.product.prodname_copilot_short %} model selection ({% data variables.product.github %}-hosted models) | {% octicon "check" aria-label="Available" %} | {% octicon "x" aria-label="Not available" %} | +| Telemetry and usage reporting | {% octicon "check" aria-label="Available" %} | {% octicon "x" aria-label="Not available" %} | +| Auto-update | {% octicon "check" aria-label="Available" %} | {% octicon "x" aria-label="Not available" %} | + diff --git a/content/admin/github-copilot/index.md b/content/admin/github-copilot/index.md new file mode 100644 index 000000000000..975f4a4b897c --- /dev/null +++ b/content/admin/github-copilot/index.md @@ -0,0 +1,8 @@ +--- +title: GitHub Copilot +intro: Configure and use {% data variables.product.prodname_copilot %} with {% data variables.product.prodname_ghe_server %}. +versions: + feature: copilot-cli-ghes +children: + - /copilot-cli +--- diff --git a/content/admin/index.md b/content/admin/index.md index c19dd05d92dc..7fdb27267256 100644 --- a/content/admin/index.md +++ b/content/admin/index.md @@ -106,10 +106,10 @@ children: - /enforcing-policies - /monitoring-activity-in-your-enterprise - /monitoring-and-managing-your-instance + - /github-copilot - /managing-github-apps-for-your-enterprise - /managing-github-actions-for-your-enterprise - /configuring-packages - /release-notes - /all-releases --- - diff --git a/data/features/copilot-cli-ghes.yml b/data/features/copilot-cli-ghes.yml new file mode 100644 index 000000000000..c513163ca935 --- /dev/null +++ b/data/features/copilot-cli-ghes.yml @@ -0,0 +1,4 @@ +# GitHub Copilot CLI support for GitHub Enterprise Server + +versions: + ghes: '>=3.22' From 0e25e86e02d3e12a5e00c0907262f860a23299fc Mon Sep 17 00:00:00 2001 From: Greg Padak Date: Thu, 27 Aug 2026 19:37:06 +0000 Subject: [PATCH 2/4] Clarifying current VS Code permissions subkey support post launch (#62953) Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: lecoursen <14935376+lecoursen@users.noreply.github.com> --- .../enterprise-managed-settings.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/content/copilot/reference/enterprise-administrators/enterprise-managed-settings.md b/content/copilot/reference/enterprise-administrators/enterprise-managed-settings.md index 3e802ac7ae50..08be02c92e64 100644 --- a/content/copilot/reference/enterprise-administrators/enterprise-managed-settings.md +++ b/content/copilot/reference/enterprise-administrators/enterprise-managed-settings.md @@ -35,9 +35,9 @@ As an exception, the following keys are composed in the most restrictive directi | Key | Purpose | {% data variables.copilot.copilot_cli_short %} | {% data variables.product.prodname_vscode_shortname %} | {% data variables.copilot.github_copilot_app %} | {% data variables.copilot.copilot_cloud_agent %} | {% data variables.product.prodname_jetbrains_ides %} | | --- | --- | --- | --- | --- | --- | --- | | `permissions.disableBypassPermissionsMode` | Disables bypass or YOLO-style allow-all behavior | {% octicon "check" aria-label="Supported" %} | {% octicon "check" aria-label="Supported" %} | {% octicon "check" aria-label="Supported" %} | {% octicon "x" aria-label="Not supported" %} | {% octicon "check" aria-label="Supported" %} | -| `permissions.deny` | Blocks specific operations | {% octicon "check" aria-label="Supported" %} | {% octicon "check" aria-label="Supported" %} | {% octicon "check" aria-label="Supported" %} | {% octicon "x" aria-label="Not supported" %} | {% octicon "x" aria-label="Not supported" %} | -| `permissions.ask` | Requires a fresh human approval before specific operations can proceed | {% octicon "check" aria-label="Supported" %} | {% octicon "check" aria-label="Supported" %} | {% octicon "check" aria-label="Supported" %} | {% octicon "x" aria-label="Not supported" %} | {% octicon "x" aria-label="Not supported" %} | -| `permissions.allow` | Permits specific operations to proceed without a prompt | {% octicon "check" aria-label="Supported" %} | {% octicon "check" aria-label="Supported" %} | {% octicon "check" aria-label="Supported" %} | {% octicon "x" aria-label="Not supported" %} | {% octicon "x" aria-label="Not supported" %} | +| `permissions.deny` | Blocks specific operations | {% octicon "check" aria-label="Supported" %} | {% octicon "x" aria-label="Not supported" %} | {% octicon "check" aria-label="Supported" %} | {% octicon "x" aria-label="Not supported" %} | {% octicon "x" aria-label="Not supported" %} | +| `permissions.ask` | Requires a fresh human approval before specific operations can proceed | {% octicon "check" aria-label="Supported" %} | {% octicon "x" aria-label="Not supported" %} | {% octicon "check" aria-label="Supported" %} | {% octicon "x" aria-label="Not supported" %} | {% octicon "x" aria-label="Not supported" %} | +| `permissions.allow` | Permits specific operations to proceed without a prompt | {% octicon "check" aria-label="Supported" %} | {% octicon "x" aria-label="Not supported" %} | {% octicon "check" aria-label="Supported" %} | {% octicon "x" aria-label="Not supported" %} | {% octicon "x" aria-label="Not supported" %} | | `model` | Sets auto model selection as the default for new conversations | {% octicon "check" aria-label="Supported" %} | {% octicon "check" aria-label="Supported" %} | {% octicon "check" aria-label="Supported" %} | {% octicon "check" aria-label="Supported" %} | {% octicon "x" aria-label="Not supported" %} | | `enabledPlugins` | Enables or disables specific plugins by key | {% octicon "check" aria-label="Supported" %} | {% octicon "check" aria-label="Supported" %} | {% octicon "check" aria-label="Supported" %} | {% octicon "check" aria-label="Supported" %} | {% octicon "check" aria-label="Supported" %} | | `extraKnownMarketplaces` | Adds plugin marketplaces that users can access | {% octicon "check" aria-label="Supported" %} | {% octicon "check" aria-label="Supported" %} | {% octicon "check" aria-label="Supported" %} | {% octicon "check" aria-label="Supported" %} | {% octicon "check" aria-label="Supported" %} | @@ -50,8 +50,6 @@ As an exception, the following keys are composed in the most restrictive directi {% endrowheaders %} -In {% data variables.product.prodname_vscode_shortname %}, managed permission rules are supported through the {% data variables.product.prodname_copilot_short %} SDK-based Agent Host. Support for legacy permission policies and other execution paths isn't yet at full parity. - ## Applying different settings to enterprise teams For server-managed deployments, the enterprise can apply different governance to groups of users based on their enterprise team membership. The enterprise defines all settings—team membership only determines which users receive a given set of values. From 0501799288feb29f320cf95e5f3b987bc1cf2588 Mon Sep 17 00:00:00 2001 From: adjn <104127038+adjn@users.noreply.github.com> Date: Thu, 27 Aug 2026 20:09:42 +0000 Subject: [PATCH 3/4] Revise support guidelines for Actions Runner Controller (#62899) Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- content/actions/concepts/runners/support-for-arc.md | 11 +++++------ src/links/lib/excluded-links.yml | 1 - 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/content/actions/concepts/runners/support-for-arc.md b/content/actions/concepts/runners/support-for-arc.md index 686650ddece5..411da4ef4598 100644 --- a/content/actions/concepts/runners/support-for-arc.md +++ b/content/actions/concepts/runners/support-for-arc.md @@ -17,20 +17,20 @@ contentType: concepts ## Overview -The Actions Runner Controller (ARC) project [was adopted by GitHub](https://github.com/actions/actions-runner-controller/discussions/2072) to release as a new GitHub product. As a result, there are currently two ARC releases: the legacy community-maintained ARC and GitHub's Autoscaling Runner Sets. +The Actions Runner Controller (ARC) project [was adopted by GitHub](https://github.com/actions/actions-runner-controller/discussions/2072) to release as a new GitHub product. As a result, there are currently two ARC releases: the legacy community-maintained ARC and GitHub's Autoscaling Runner Sets. {% data variables.product.company_short %}'s Autoscaling Runner Sets work with both Kubernetes and OpenShift. GitHub only supports the latest Autoscaling Runner Sets version of ARC. Support for the legacy ARC is provided by the community in the [Actions Runner Controller](https://github.com/actions/actions-runner-controller) repository only. ## Scope of support for Actions Runner Controller -To ensure a smooth adoption of Actions Runner Controller, we recommend that organizations have a Kubernetes expert on staff. Many aspects of ARC installation, including container orchestration, networking, policy application, and integration with managed Kubernetes providers, fall outside GitHub Support’s scope and require in-depth Kubernetes knowledge. If your support request is outside of the scope of what our team can help you with, we may recommend next steps to resolve your issue outside of {% data variables.contact.github_support %}. Your support request is out of {% data variables.contact.github_support %}'s scope if the request is primarily about: +To ensure a smooth adoption of {% data variables.product.prodname_actions_runner_controller %}, we recommend that organizations have staff with expert-level knowledge of container orchestration. Many aspects of ARC installation, including orchestration, networking, policy application, and integration with managed cluster providers, fall outside {% data variables.contact.github_support %}'s scope and require in-depth knowledge of your clustering tools (i.e. Kubernetes or OpenShift). If your support request is outside of the scope of what our team can help you with, we may be able to recommend next steps to help resolve your issue or provide other guidance. Your support request is out of {% data variables.contact.github_support %}'s scope if the request is primarily about: * The legacy community-maintained version of ARC * Installing, configuring, or maintaining dependencies * Template spec customization -* Container orchestration, such as Kubernetes setup, networking, building images in ARC (DinD), etc. -* Applying Kubernetes policies -* Managed Kubernetes providers or provider-specific configurations +* Container orchestration, such as Kubernetes/OpenShift setup, networking, building images in ARC (DinD), etc. +* Applying cluster policies +* Managed container orchestration providers or provider-specific configurations * [Runner Container Hooks](https://github.com/actions/runner-container-hooks) in conjunction with ARC's `kubernetes` mode * Installation tooling other than Helm * Storage provisioners and PersistentVolumeClaims (PVCs) @@ -44,7 +44,6 @@ While ARC may be deployed successfully with different tooling and configurations For more information about contacting {% data variables.contact.github_support %}, see [AUTOTITLE](/support/contacting-github-support). > [!NOTE] -> * OpenShift clusters are in public preview. See guidance from [Red Hat](https://developers.redhat.com/articles/2025/02/17/how-securely-deploy-github-arc-openshift#arc_architecture) for configuration recommendations. > * ARC is only supported on GitHub Enterprise Server versions 3.9 and greater. ## Working with {% data variables.contact.github_support %} for Actions Runner Controller diff --git a/src/links/lib/excluded-links.yml b/src/links/lib/excluded-links.yml index 890efb387f2b..9dc472d2af2e 100644 --- a/src/links/lib/excluded-links.yml +++ b/src/links/lib/excluded-links.yml @@ -104,7 +104,6 @@ - startsWith: https://github.com/githubcustomers/enterprise-preview-program - is: https://aka.ms/copiloteclipse - is: https://papers.ssrn.com/sol3/papers.cfm?abstract_id=1375604 -- is: https://developers.redhat.com/articles/2025/02/17/how-securely-deploy-github-arc-openshift#arc_architecture - startsWith: https://creativecommons.org/ - is: https://www.adobe.com/privacy/policy.html - is: https://www.facebook.com/policies/cookies/ From 2e26a3c2bd4fb06943c87226121c05da12bc1a93 Mon Sep 17 00:00:00 2001 From: docs-bot <77750099+docs-bot@users.noreply.github.com> Date: Thu, 27 Aug 2026 21:37:14 +0000 Subject: [PATCH 4/4] Markdown freshness: fix stale path references in src README files (#62963) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Kevin Heis Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- src/events/README.md | 2 +- src/redirects/README.md | 12 ++++++------ src/tests/README.md | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/events/README.md b/src/events/README.md index 1a8681c5ce7f..fc6bab7e9dfa 100644 --- a/src/events/README.md +++ b/src/events/README.md @@ -143,5 +143,5 @@ Survey responses with comments are analyzed for sentiment: - Validation errors appear in server logs - Production validation errors sent to Hydro for tracking -- Use `analyze-comment-cli.ts` to test sentiment analysis locally +- Use `scripts/analyze-comment-cli.ts` to test sentiment analysis locally diff --git a/src/redirects/README.md b/src/redirects/README.md index 70fdc6a1369b..3b5933cf8f7b 100644 --- a/src/redirects/README.md +++ b/src/redirects/README.md @@ -12,11 +12,11 @@ Read on for more about how redirects work under the hood. Precompiled redirects account for the majority of the docs site's redirect handling. -When [`lib/warm-server.ts`](lib/warm-server.ts) runs on server start, it creates all pages in the site by instantiating the [`Page` class](lib/page.ts) for each content file, then passes the pages to `lib/redirects/precompile.ts` to create redirects. The precompile script runs `lib/redirects/permalinks.ts`, which: +When [`src/frame/lib/warm-server.ts`](../frame/lib/warm-server.ts) runs on server start, it creates all pages in the site by instantiating the [`Page` class](../frame/lib/page.ts) for each content file, then passes the pages to `lib/precompile.ts` to create redirects. The precompile script runs `lib/permalinks.ts`, which: -1. Includes all legacy redirects from `static/developerjson` +1. Includes all legacy redirects from `lib/static/developer.json` 2. Loops over each page's [frontmatter `redirect_from` entries](content/README.md#redirect_from) and creates an array of legacy paths for each one (using the same handling as for permalinks). -3. Any other exceptions from the `static/redirect-exceptions.txt` file +3. Any other exceptions from the `lib/static/redirect-exceptions.txt` file The results comprise the `page.redirects` object, whose keys are always only the path without language. Sometimes it contains the specific plan/version (e.g. `/enterprise-server@3.0/v3/integrations` to `enterprise-server@3.0/developers/apps`) and sometimes it's just the plain path @@ -44,11 +44,11 @@ Some background on archival: a snapshot of the HTML files for each deprecated En Starting with Enterprise Server 2.18, we updated the archival process to start preserving frontmatter and permalink redirects. But these redirects for 2.13 to 2.17 are not recoverable. -As a workaround for these lost redirects, we have two files in `lib/redirects/static`: +As a workaround for these lost redirects, we have two files in `lib/static`: * `archived-redirects-from-213-to-217.json` - This file contains keys equal to old routes and values equal to new routes (aka snapshots of permalinks at the time) for versions 2.13 to 2.17. (The old routes were generated via `lib/redirects/get-old-paths-from-permalink.ts`.) + This file contains keys equal to old routes and values equal to new routes (aka snapshots of permalinks at the time) for versions 2.13 to 2.17. (The old routes were generated via `lib/permalinks.ts`.) * `archived-frontmatter-valid-urls.json` @@ -66,7 +66,7 @@ Here's how the `src/archives/middleware/archived-enterprise-versions.ts` fallbac ## Tests -Redirect tests are mainly found in `tests/routing/*`, with some additional tests in `tests/rendering/server.ts`. +Redirect tests are mainly found in `tests/routing/*`, with some additional tests in `src/frame/tests/server.ts`. The `src/fixtures/fixtures/*` directory includes `developer-redirects.json`, `graphql-redirects.json`, and `rest-redirects.json`. diff --git a/src/tests/README.md b/src/tests/README.md index a6073ae9172c..8bb6eb851930 100644 --- a/src/tests/README.md +++ b/src/tests/README.md @@ -225,7 +225,7 @@ npm run lint Tests should be co-located with their subject: - ✅ `src/search/tests/api-search.ts` -- ✅ `src/versions/tests/middleware.ts` +- ✅ `src/events/tests/middleware.ts` - ❌ `src/tests/search-tests.ts` (wrong - not in subject) Shared utilities belong in `src/tests/`: