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 %}
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.
63 changes: 60 additions & 3 deletions src/metrics/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,66 @@ CLI tools to fetch data from the Kusto API.
1. Enter your `<username>@githubazure.com` credentials.
* These will get cached for future logins.
1. At the prompt in Terminal asking which subscription you want to use, just press Enter to choose the default.
1. Open or create an `.env` file in the root directory of your checkout (this file is already in `.gitignore`).
1. Add the `KUSTO_CLUSTER` and `KUSTO_DATABASE` values to the `.env`.
1. Open or create an `.env` file in the root directory of your checkout (this file is already in `.gitignore` so it won't be tracked by Git).
1. Add the `KUSTO_CLUSTER` and `KUSTO_DATABASE` values to the `.env` (_these values are pinned in slack_):
```
KUSTO_CLUSTER='<value>'
KUSTO_DATABASE='<value>'
```
```

## docstat usage

Run `npm run docstat -- <URL>` on any GitHub Docs URL to gather a set of default metrics about it, including 30d views, users, view duration, bounces, helpfulness score, and exits to support.

Notes:
* If the URL doesn't include a version, `docstat` will return data that includes **all versions** (so FPT, Cloud, Server, etc.).
* If you want data for FPT only, pass the `--fptOnly` option.
* `docstat` only accepts URLs with an `en` language code or no language code, and it only fetches English data.

To see all the options:
```
npm run docstat -- --help
```
You can combine options like this:
```
npm run docstat -- https://docs.github.com/copilot/tutorials/modernize-legacy-code --compare --range 60
```
Use `--redirects` to include `redirect_from` frontmatter paths in the queries (this is helpful if the article may have moved recently):
```
npm run docstat -- https://docs.github.com/copilot/tutorials/modernize-legacy-code --redirects
```
Use the `--json` (or `-j`) option to output JSON:
```
npm run docstat -- https://docs.github.com/copilot/tutorials/modernize-legacy-code --json
```
If you want to pass the results of the JSON to `jq`, you need to use `silent` mode:
```
npm run --silent docstat -- https://docs.github.com/copilot/tutorials/modernize-legacy-code --json | jq .data.users
```

## docsaudit usage

Run `npm run docsaudit` on a top-level content directory to gather data about its files—including title, path, versions, 30d views, and 30d users—and output it to a CSV file.

To see all the options:
```
npm run docsaudit -- --help
```
Run the script on any top-level content directory:
```
npm run docsaudit -- <content directory name>
```
For example:
```
npm run docsaudit -- actions
```

## Future development

Applies to all scripts:

* The date range option only accepts a start date (via `-r <number>`, where the number means "`<number>` days ago"). The end date will always be the current date.
* In the future, we can add an option to set a custom end date.

* The only Kusto queries available are hardcoded in the `kusto/queries` directory.
* In the future, we can hardcode more queries, add the ability to send custom queries, or perhaps create pre-defined sets of queries.
Loading