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
5 changes: 3 additions & 2 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
// Install features. Type 'feature' in the VS Code command palette for a full list.
"features": {
"sshd": "latest",
"ghcr.io/devcontainers/features/copilot-cli:1": {
"version": "prerelease"
},
"ghcr.io/devcontainers/features/github-cli:1": {}
},

Expand Down Expand Up @@ -59,8 +62,6 @@
},

// Lifecycle commands
// Install dependencies then install Copilot CLI
"onCreateCommand": "npm ci && npm install -g @github/copilot@prerelease",
// Start a web server and keep it running
"postStartCommand": "nohup bash -c 'npm start &'",
// Set port 4000 to be public
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/enterprise-dates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:

- name: Create pull request
id: create-pull-request
uses: peter-evans/create-pull-request@84ae59a2cdc2258d6fa0732dd66352dddae2a412 # pin @v7.0.9
uses: peter-evans/create-pull-request@98357b18bf14b5342f975ff684046ec3b2a07725 # pin @v8.0.0
env:
# Disable pre-commit hooks; they don't play nicely here
HUSKY: '0'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sync-graphql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
run: npm run sync-graphql
- name: Create pull request
id: create-pull-request
uses: peter-evans/create-pull-request@84ae59a2cdc2258d6fa0732dd66352dddae2a412 # pin @v7.0.9
uses: peter-evans/create-pull-request@98357b18bf14b5342f975ff684046ec3b2a07725 # pin @v8.0.0
env:
# Disable pre-commit hooks; they don't play nicely here
HUSKY: '0'
Expand Down
10 changes: 6 additions & 4 deletions content/copilot/concepts/auto-model-selection.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: 'About {% data variables.product.prodname_copilot_short %} auto model sel
allowTitleToDifferFromFilename: true
shortTitle: 'Auto model selection'
intro: 'Automatically select models for {% data variables.copilot.copilot_chat_short %} and {% data variables.copilot.copilot_coding_agent %}.'
product: '{% data variables.copilot.copilot_auto_model_selection_short_cap_a %} for {% data variables.copilot.copilot_chat_short %} is in {% data variables.release-phases.public_preview %} for supported IDEs with all {% data variables.product.prodname_copilot %} plans. {% data variables.copilot.copilot_auto_model_selection_short_cap_a %} for {% data variables.copilot.copilot_coding_agent %} is generally available for {% data variables.copilot.copilot_pro %} and {% data variables.copilot.copilot_pro_plus %} users.'
product: '{% data variables.copilot.copilot_auto_model_selection_short_cap_a %} for {% data variables.copilot.copilot_chat_short %} is available with all {% data variables.product.prodname_copilot %} plans. <br>{% data variables.copilot.copilot_auto_model_selection_short_cap_a %} for {% data variables.copilot.copilot_coding_agent %} is available for {% data variables.copilot.copilot_pro %} and {% data variables.copilot.copilot_pro_plus %} plans.'
topics:
- Copilot
versions:
Expand Down Expand Up @@ -32,8 +32,10 @@ With {% data variables.copilot.copilot_auto_model_selection %}, you benefit from

## {% data variables.copilot.copilot_auto_model_selection_short_cap_a %} in {% data variables.copilot.copilot_chat_short %}

{% data variables.copilot.copilot_auto_model_selection_short_cap_a %} is available in the following IDEs:
{% data variables.copilot.copilot_auto_model_selection_short_cap_a %} is generally available in the following IDEs:
* {% data variables.product.prodname_vscode_shortname %}

{% data variables.copilot.copilot_auto_model_selection_short_cap_a %} is in public preview for the following IDEs:
* {% data variables.product.prodname_vs %}
* Eclipse
* JetBrains IDEs
Expand All @@ -60,11 +62,11 @@ During the {% data variables.release-phases.public_preview %}, if you're using a

## {% data variables.copilot.copilot_auto_model_selection_short_cap_a %} in {% data variables.copilot.copilot_coding_agent %}

> [!NOTE] {% data variables.copilot.copilot_auto_model_selection_short_cap_a %} for {% data variables.copilot.copilot_coding_agent %} is currently only available for {% data variables.copilot.copilot_pro %} and {% data variables.copilot.copilot_pro_plus %} users.
> [!NOTE] {% data variables.copilot.copilot_auto_model_selection_short_cap_a %} for {% data variables.copilot.copilot_coding_agent %} is generally available and currently only available for {% data variables.copilot.copilot_pro %} and {% data variables.copilot.copilot_pro_plus %} plans.

When you select **Auto** in {% data variables.copilot.copilot_coding_agent %}, {% data variables.copilot.copilot_auto_model_selection_short_cap_a %} currently chooses from the following list of models, subject to your policies and subscription type:
{% data reusables.copilot.copilot-coding-agent-auto-models %}

While {% data variables.copilot.copilot_auto_model_selection_short %} is an option for {% data variables.copilot.copilot_coding_agent %}, you can manually choose a different model to override this selection.

{% data reusables.copilot.change-the-ai-model-copilot-coding-agent %}
{% data reusables.copilot.change-the-ai-model-copilot-coding-agent %}
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ You can create your own custom instructions file from scratch. See [Writing your

- For each of bootstrap, build, test, run, lint, and any other scripted step, document the sequence of steps to take to run it successfully as well as the versions of any runtime or build tools used.
- Each command should be validated by running it to ensure that it works correctly as well as any preconditions and postconditions.
- Try cleaning the repo and environment and running commands in different orders and document errors and and misbehavior observed as well as any steps used to mitigate the problem.
- Try cleaning the repo and environment and running commands in different orders and document errors and misbehavior observed as well as any steps used to mitigate the problem.
- Run the tests and document the order of steps required to run the tests.
- Make a change to the codebase. Document any unexpected build issues as well as the workarounds.
- Document environment setup steps that seem optional but that you have validated are actually required.
Expand Down
5 changes: 3 additions & 2 deletions content/copilot/reference/custom-agents-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ The following table outlines the properties that are supported in repository-lev
| `description` | **Required** string | Description of the {% data variables.copilot.copilot_custom_agent_short %}'s purpose and capabilities | {% octicon "check" aria-label="Supported" %} | {% octicon "check" aria-label="Supported" %} | {% octicon "check" aria-label="Supported" %} |
| `target` | string | Target environment or context for the {% data variables.copilot.copilot_custom_agent_short %} (`vscode` or `github-copilot`). If unset, defaults to both environments. | {% octicon "check" aria-label="Supported" %} | {% octicon "check" aria-label="Supported" %} | {% octicon "check" aria-label="Supported" %} |
| `tools` | list of strings, string | List of tool names the {% data variables.copilot.copilot_custom_agent_short %} can use. Supports both a comma separated string and yaml string array. If unset, defaults to all tools. See [Tools](#tools). | {% octicon "check" aria-label="Supported" %} | {% octicon "check" aria-label="Supported" %} | {% octicon "check" aria-label="Supported" %} |
| `infer` | boolean | Controls whether {% data variables.copilot.copilot_coding_agent %} can automatically use this {% data variables.copilot.copilot_custom_agent_short %} based on task context. When `false`, the agent must be manually selected. If unset, defaults to `true`. | {% octicon "check" aria-label="Supported" %} | {% octicon "check" aria-label="Supported" %} | {% octicon "check" aria-label="Supported" %} |
| `mcp-servers` | object | Additional MCP servers and tools that should be used by the {% data variables.copilot.copilot_custom_agent_short %}. | {% octicon "x" aria-label="Not supported" %} | {% octicon "check" aria-label="Supported" %} | {% octicon "x" aria-label="Not supported" %} |
| `metadata` | object consisting of a name and value pair, both strings | Allows annotation of the agent with useful data | {% octicon "check" aria-label="Supported" %} | {% octicon "check" aria-label="Supported" %} | {% octicon "x" aria-label="Not supported" %} |

Expand Down Expand Up @@ -56,11 +57,11 @@ The following tool aliases are available for {% data variables.copilot.custom_ag

| Primary alias | Compatible aliases | {% data variables.copilot.copilot_coding_agent_short_cap_c %} mapping | Purpose |
| ------------- | -------------------------------------------- | ---------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
| `shell` | `Bash`, `powershell` | Shell tools: `bash` or `powershell` | Execute a command in the appropriate shell for the operating system. |
| `execute` | `shell`, `Bash`, `powershell` | Shell tools: `bash` or `powershell` | Execute a command in the appropriate shell for the operating system. |
| `read` | `Read`, `NotebookRead` | `view` | Read file contents. |
| `edit` | `Edit`, `MultiEdit`, `Write`, `NotebookEdit` | Edit tools: e.g. `str_replace`, `str_replace_editor` | Allow LLM to edit. Exact arguments can vary. |
| `search` | `Grep`, `Glob` | `search` | Search for files or text in files. |
| `custom-agent` | `Task` | "{% data variables.copilot.copilot_custom_agent_caps_short %}" tools | Allows a different {% data variables.copilot.copilot_custom_agent_short %} to be invoked to accomplish a task. |
| `agent` | `custom-agent`, `Task` | "{% data variables.copilot.copilot_custom_agent_caps_short %}" tools | Allows a different {% data variables.copilot.copilot_custom_agent_short %} to be invoked to accomplish a task. |
| `web` | `WebSearch`, `WebFetch` | Currently not applicable for {% data variables.copilot.copilot_coding_agent_short %}. | Allows fetching content from URLs and performing a web search |
| `todo` | `TodoWrite` | Currently not applicable for {% data variables.copilot.copilot_coding_agent_short %}. | Creates and manages structured task lists. Not supported in {% data variables.copilot.copilot_coding_agent_short %} today, but supported by {% data variables.product.prodname_vscode_shortname %}. |

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@ redirect_from:

From time to time, GitHub receives requests from governments to remove content that has been declared unlawful in their local jurisdiction. Although we may not always agree with those laws, we may need to block content if we receive a complete request from a government official so that our users in that jurisdiction may continue to have access to GitHub to collaborate and build software.

## What is a complete government takedown request?
## How to submit a government takedown request

<!-- markdownlint-disable GHD034 -->

To count as a complete request, a request or notice must
If you are a government official and wish to request the removal of content under this policy, you can submit your request using our [Government Takedown Requests Form](https://support.github.com/contact/government-takedown).

To count as complete, a request must
* come from a relevant, official government agency
* identify illegal content
* specify the source of illegality in that jurisdiction (law or court order).
Expand Down
21 changes: 16 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"debug": "cross-env NODE_ENV=development ENABLED_LANGUAGES=en nodemon --inspect src/frame/server.ts",
"delete-orphan-translation-files": "tsx src/workflows/delete-orphan-translation-files.ts",
"docsaudit": "tsx src/metrics/scripts/docsaudit.ts",
"docstat": "tsx src/metrics/scripts/docstat.ts",
"docstat": "tsx --disable-warning=DEP0190 src/metrics/scripts/docstat.ts",
"deleted-assets-pr-comment": "tsx src/assets/scripts/deleted-assets-pr-comment.ts",
"deleted-features-pr-comment": "tsx src/data-directory/scripts/deleted-features-pr-comment.ts",
"deprecate-ghes": "tsx src/ghes-releases/scripts/deprecate/index.ts",
Expand Down Expand Up @@ -245,7 +245,7 @@
"walk-sync": "^4.0.1"
},
"devDependencies": {
"@actions/core": "^1.10.1",
"@actions/core": "^2.0.0",
"@actions/github": "^6.0.0",
"@axe-core/playwright": "^4.10.1",
"@eslint/js": "^9.33.0",
Expand Down
67 changes: 67 additions & 0 deletions src/changelogs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Changelogs (`src/changelogs`)

This directory contains the logic for fetching, parsing, and caching RSS feeds from the GitHub Blog to display changelog items on documentation pages.

## Purpose & Scope

The primary purpose is to provide a "What's New" section on specific documentation pages by pulling the latest updates from relevant GitHub Blog RSS feeds. It handles fetching RSS feeds, caching responses to prevent rate limiting, and parsing feed items for display.

## Architecture & Key Assets

### Core Logic

`lib/changelog.ts` is the main module. It uses `rss-parser` to fetch feeds and implements a two-layer caching strategy:

1. Memory Cache: `globalCache` Map for fast access within the process.
2. Disk Cache: Writes JSON files to `os.tmpdir()` (or a custom path) to persist across server restarts in development/test environments.

`getChangelogItems` is the public API that returns a list of formatted changelog items.

### Consumers

The middleware `src/frame/middleware/context/whats-new-changelog.ts` uses this library to inject changelog data into the page context (`req.context.whatsNewChangelog`) based on page frontmatter.

Currently, the following product landing pages display a changelog:

- GitHub Actions (`content/actions/index.md`)
- GitHub Education (`content/education/index.md`)
- GitHub Enterprise (`content/admin/index.md`)
- GitHub Packages (`content/packages/index.md`)

## Setup & Usage

### Enabling on a Page

To display a changelog on a documentation page, add the `changelog` property to the page's frontmatter:

```yaml
changelog:
label: packages
prefix: "Packages: "
```

- `label`: Determines the feed URL (e.g., `packages` -> `https://github.blog/changelog/label/packages`).
- `prefix`: (Optional) A string to strip from the beginning of feed item titles.
- `versions`: (Optional) Specifies which versions of the docs should display the changelog.

### Environment Variables

- `CHANGELOG_DISABLED`: Set to `true` to disable fetching (returns undefined). This is often necessary in tests where external network requests are flaky or blocked.
- `CHANGELOG_CACHE_FILE_PATH`: (Optional) Override the default disk cache location.

## Data & External Dependencies

- Source: [GitHub Blog](https://github.blog) RSS feeds (e.g., `https://github.blog/changelog/label/packages/feed`).
- Dependencies: `rss-parser` is used to parse the XML RSS feeds.

## Cross-links & Ownership

- **Owner**: Docs Engineering owns this code. Marketing Engineering owns the GitHub Blog and its feeds.
- **Related Directories**:
- `src/frame/middleware/context`: Contains the middleware that invokes this logic.
- `src/changelogs/tests`: Contains tests for this module.

## Current State & Next Steps

- **Current State**: The system is stable and considered KTLO (Keep the Lights On). It fetches the latest 3 items from the specified feed.
- **Next Steps**: None planned.
Loading