Skip to content

Commit d7e9a84

Browse files
authored
Merge pull request #41783 from github/repo-sync
Repo sync
2 parents 1b37add + 8a6ed96 commit d7e9a84

File tree

16 files changed

+4554
-148
lines changed

16 files changed

+4554
-148
lines changed

.devcontainer/devcontainer.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
// Install features. Type 'feature' in the VS Code command palette for a full list.
1313
"features": {
1414
"sshd": "latest",
15+
"ghcr.io/devcontainers/features/copilot-cli:1": {
16+
"version": "prerelease"
17+
},
1518
"ghcr.io/devcontainers/features/github-cli:1": {}
1619
},
1720

@@ -59,8 +62,6 @@
5962
},
6063

6164
// Lifecycle commands
62-
// Install dependencies then install Copilot CLI
63-
"onCreateCommand": "npm ci && npm install -g @github/copilot@prerelease",
6465
// Start a web server and keep it running
6566
"postStartCommand": "nohup bash -c 'npm start &'",
6667
// Set port 4000 to be public

.github/workflows/enterprise-dates.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535

3636
- name: Create pull request
3737
id: create-pull-request
38-
uses: peter-evans/create-pull-request@84ae59a2cdc2258d6fa0732dd66352dddae2a412 # pin @v7.0.9
38+
uses: peter-evans/create-pull-request@98357b18bf14b5342f975ff684046ec3b2a07725 # pin @v8.0.0
3939
env:
4040
# Disable pre-commit hooks; they don't play nicely here
4141
HUSKY: '0'

.github/workflows/sync-graphql.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
run: npm run sync-graphql
3434
- name: Create pull request
3535
id: create-pull-request
36-
uses: peter-evans/create-pull-request@84ae59a2cdc2258d6fa0732dd66352dddae2a412 # pin @v7.0.9
36+
uses: peter-evans/create-pull-request@98357b18bf14b5342f975ff684046ec3b2a07725 # pin @v8.0.0
3737
env:
3838
# Disable pre-commit hooks; they don't play nicely here
3939
HUSKY: '0'

content/copilot/concepts/auto-model-selection.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: 'About {% data variables.product.prodname_copilot_short %} auto model sel
33
allowTitleToDifferFromFilename: true
44
shortTitle: 'Auto model selection'
55
intro: 'Automatically select models for {% data variables.copilot.copilot_chat_short %} and {% data variables.copilot.copilot_coding_agent %}.'
6-
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.'
6+
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.'
77
topics:
88
- Copilot
99
versions:
@@ -32,8 +32,10 @@ With {% data variables.copilot.copilot_auto_model_selection %}, you benefit from
3232
3333
## {% data variables.copilot.copilot_auto_model_selection_short_cap_a %} in {% data variables.copilot.copilot_chat_short %}
3434

35-
{% data variables.copilot.copilot_auto_model_selection_short_cap_a %} is available in the following IDEs:
35+
{% data variables.copilot.copilot_auto_model_selection_short_cap_a %} is generally available in the following IDEs:
3636
* {% data variables.product.prodname_vscode_shortname %}
37+
38+
{% data variables.copilot.copilot_auto_model_selection_short_cap_a %} is in public preview for the following IDEs:
3739
* {% data variables.product.prodname_vs %}
3840
* Eclipse
3941
* JetBrains IDEs
@@ -60,11 +62,11 @@ During the {% data variables.release-phases.public_preview %}, if you're using a
6062

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

63-
> [!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.
65+
> [!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.
6466
6567
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:
6668
{% data reusables.copilot.copilot-coding-agent-auto-models %}
6769

6870
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.
6971

70-
{% data reusables.copilot.change-the-ai-model-copilot-coding-agent %}
72+
{% data reusables.copilot.change-the-ai-model-copilot-coding-agent %}

content/copilot/reference/custom-agents-configuration.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ The following table outlines the properties that are supported in repository-lev
2525
| `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" %} |
2626
| `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" %} |
2727
| `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" %} |
28+
| `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" %} |
2829
| `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" %} |
2930
| `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" %} |
3031

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

5758
| Primary alias | Compatible aliases | {% data variables.copilot.copilot_coding_agent_short_cap_c %} mapping | Purpose |
5859
| ------------- | -------------------------------------------- | ---------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
59-
| `shell` | `Bash`, `powershell` | Shell tools: `bash` or `powershell` | Execute a command in the appropriate shell for the operating system. |
60+
| `execute` | `shell`, `Bash`, `powershell` | Shell tools: `bash` or `powershell` | Execute a command in the appropriate shell for the operating system. |
6061
| `read` | `Read`, `NotebookRead` | `view` | Read file contents. |
6162
| `edit` | `Edit`, `MultiEdit`, `Write`, `NotebookEdit` | Edit tools: e.g. `str_replace`, `str_replace_editor` | Allow LLM to edit. Exact arguments can vary. |
6263
| `search` | `Grep`, `Glob` | `search` | Search for files or text in files. |
63-
| `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. |
64+
| `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. |
6465
| `web` | `WebSearch`, `WebFetch` | Currently not applicable for {% data variables.copilot.copilot_coding_agent_short %}. | Allows fetching content from URLs and performing a web search |
6566
| `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 %}. |
6667

content/site-policy/other-site-policies/github-government-takedown-policy.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,13 @@ redirect_from:
1414

1515
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.
1616

17-
## What is a complete government takedown request?
17+
## How to submit a government takedown request
1818

1919
<!-- markdownlint-disable GHD034 -->
2020

21-
To count as a complete request, a request or notice must
21+
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).
22+
23+
To count as complete, a request must
2224
* come from a relevant, official government agency
2325
* identify illegal content
2426
* specify the source of illegality in that jurisdiction (law or court order).

package-lock.json

Lines changed: 16 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"debug": "cross-env NODE_ENV=development ENABLED_LANGUAGES=en nodemon --inspect src/frame/server.ts",
3131
"delete-orphan-translation-files": "tsx src/workflows/delete-orphan-translation-files.ts",
3232
"docsaudit": "tsx src/metrics/scripts/docsaudit.ts",
33-
"docstat": "tsx src/metrics/scripts/docstat.ts",
33+
"docstat": "tsx --disable-warning=DEP0190 src/metrics/scripts/docstat.ts",
3434
"deleted-assets-pr-comment": "tsx src/assets/scripts/deleted-assets-pr-comment.ts",
3535
"deleted-features-pr-comment": "tsx src/data-directory/scripts/deleted-features-pr-comment.ts",
3636
"deprecate-ghes": "tsx src/ghes-releases/scripts/deprecate/index.ts",
@@ -245,7 +245,7 @@
245245
"walk-sync": "^4.0.1"
246246
},
247247
"devDependencies": {
248-
"@actions/core": "^1.10.1",
248+
"@actions/core": "^2.0.0",
249249
"@actions/github": "^6.0.0",
250250
"@axe-core/playwright": "^4.10.1",
251251
"@eslint/js": "^9.33.0",

src/changelogs/README.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Changelogs (`src/changelogs`)
2+
3+
This directory contains the logic for fetching, parsing, and caching RSS feeds from the GitHub Blog to display changelog items on documentation pages.
4+
5+
## Purpose & Scope
6+
7+
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.
8+
9+
## Architecture & Key Assets
10+
11+
### Core Logic
12+
13+
`lib/changelog.ts` is the main module. It uses `rss-parser` to fetch feeds and implements a two-layer caching strategy:
14+
15+
1. Memory Cache: `globalCache` Map for fast access within the process.
16+
2. Disk Cache: Writes JSON files to `os.tmpdir()` (or a custom path) to persist across server restarts in development/test environments.
17+
18+
`getChangelogItems` is the public API that returns a list of formatted changelog items.
19+
20+
### Consumers
21+
22+
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.
23+
24+
Currently, the following product landing pages display a changelog:
25+
26+
- GitHub Actions (`content/actions/index.md`)
27+
- GitHub Education (`content/education/index.md`)
28+
- GitHub Enterprise (`content/admin/index.md`)
29+
- GitHub Packages (`content/packages/index.md`)
30+
31+
## Setup & Usage
32+
33+
### Enabling on a Page
34+
35+
To display a changelog on a documentation page, add the `changelog` property to the page's frontmatter:
36+
37+
```yaml
38+
changelog:
39+
label: packages
40+
prefix: "Packages: "
41+
```
42+
43+
- `label`: Determines the feed URL (e.g., `packages` -> `https://github.blog/changelog/label/packages`).
44+
- `prefix`: (Optional) A string to strip from the beginning of feed item titles.
45+
- `versions`: (Optional) Specifies which versions of the docs should display the changelog.
46+
47+
### Environment Variables
48+
49+
- `CHANGELOG_DISABLED`: Set to `true` to disable fetching (returns undefined). This is often necessary in tests where external network requests are flaky or blocked.
50+
- `CHANGELOG_CACHE_FILE_PATH`: (Optional) Override the default disk cache location.
51+
52+
## Data & External Dependencies
53+
54+
- Source: [GitHub Blog](https://github.blog) RSS feeds (e.g., `https://github.blog/changelog/label/packages/feed`).
55+
- Dependencies: `rss-parser` is used to parse the XML RSS feeds.
56+
57+
## Cross-links & Ownership
58+
59+
- **Owner**: Docs Engineering owns this code. Marketing Engineering owns the GitHub Blog and its feeds.
60+
- **Related Directories**:
61+
- `src/frame/middleware/context`: Contains the middleware that invokes this logic.
62+
- `src/changelogs/tests`: Contains tests for this module.
63+
64+
## Current State & Next Steps
65+
66+
- **Current State**: The system is stable and considered KTLO (Keep the Lights On). It fetches the latest 3 items from the specified feed.
67+
- **Next Steps**: None planned.

src/metrics/README.md

Lines changed: 60 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,66 @@ CLI tools to fetch data from the Kusto API.
1111
1. Enter your `<username>@githubazure.com` credentials.
1212
* These will get cached for future logins.
1313
1. At the prompt in Terminal asking which subscription you want to use, just press Enter to choose the default.
14-
1. Open or create an `.env` file in the root directory of your checkout (this file is already in `.gitignore`).
15-
1. Add the `KUSTO_CLUSTER` and `KUSTO_DATABASE` values to the `.env`.
14+
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).
15+
1. Add the `KUSTO_CLUSTER` and `KUSTO_DATABASE` values to the `.env` (_these values are pinned in slack_):
1616
```
1717
KUSTO_CLUSTER='<value>'
1818
KUSTO_DATABASE='<value>'
19-
```
19+
```
20+
21+
## docstat usage
22+
23+
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.
24+
25+
Notes:
26+
* If the URL doesn't include a version, `docstat` will return data that includes **all versions** (so FPT, Cloud, Server, etc.).
27+
* If you want data for FPT only, pass the `--fptOnly` option.
28+
* `docstat` only accepts URLs with an `en` language code or no language code, and it only fetches English data.
29+
30+
To see all the options:
31+
```
32+
npm run docstat -- --help
33+
```
34+
You can combine options like this:
35+
```
36+
npm run docstat -- https://docs.github.com/copilot/tutorials/modernize-legacy-code --compare --range 60
37+
```
38+
Use `--redirects` to include `redirect_from` frontmatter paths in the queries (this is helpful if the article may have moved recently):
39+
```
40+
npm run docstat -- https://docs.github.com/copilot/tutorials/modernize-legacy-code --redirects
41+
```
42+
Use the `--json` (or `-j`) option to output JSON:
43+
```
44+
npm run docstat -- https://docs.github.com/copilot/tutorials/modernize-legacy-code --json
45+
```
46+
If you want to pass the results of the JSON to `jq`, you need to use `silent` mode:
47+
```
48+
npm run --silent docstat -- https://docs.github.com/copilot/tutorials/modernize-legacy-code --json | jq .data.users
49+
```
50+
51+
## docsaudit usage
52+
53+
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.
54+
55+
To see all the options:
56+
```
57+
npm run docsaudit -- --help
58+
```
59+
Run the script on any top-level content directory:
60+
```
61+
npm run docsaudit -- <content directory name>
62+
```
63+
For example:
64+
```
65+
npm run docsaudit -- actions
66+
```
67+
68+
## Future development
69+
70+
Applies to all scripts:
71+
72+
* 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.
73+
* In the future, we can add an option to set a custom end date.
74+
75+
* The only Kusto queries available are hardcoded in the `kusto/queries` directory.
76+
* In the future, we can hardcode more queries, add the ability to send custom queries, or perhaps create pre-defined sets of queries.

0 commit comments

Comments
 (0)