Skip to content

Commit 2373209

Browse files
authored
Merge pull request #45988 from github/repo-sync
Repo sync
2 parents 63859c4 + 3662f64 commit 2373209

60 files changed

Lines changed: 461 additions & 58 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/instructions/code.instructions.md‎

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ applyTo: "src/**,.github/**,config/**,.devcontainer/**,**Dockerfile,package*.jso
44

55
# Copilot code instructions for docs.github.com
66

7-
For code reviews and for creating or updating pull requests, follow the Guidelines, Tests, and Validate sections below.
7+
For code reviews and for creating or updating pull requests, follow the guidelines in the sections below.
88

99
## Guidelines
1010

@@ -101,3 +101,27 @@ logger.error("Failure", { error });
101101
- Never log secrets, tokens, or PII.
102102
- Create loggers once at module scope, not inside functions.
103103
- Do not use the logger in scripts (locally-run code); `console.log` is fine there.
104+
105+
## Code comments
106+
107+
- Comments explain _why_ and not _what_. Use variables, names, types, and structure to convey _what_ the code does. If the code doesn't need a _why_, don't write a comment.
108+
- Document constraints, workarounds, unexpected dependencies, domain rules, user-visible consequences, security, ordering, and performance issues.
109+
- Be concise. Keep the comment to a glance.
110+
- Use active voice and active, specific verbs. Avoid phrases like "there is", "should", or vague "uses". Prefer "does x" over "is x". Do not hedge. If needed, write the action then the reason, such as "do X, so Y".
111+
- Do not narrate, restate, or summarize the code.
112+
- Avoid jargon, or define jargon if you must use it.
113+
- Describe the current state. Avoid framing such as "now" or "recently". Do not include the previous state.
114+
- In TypeScript and JavaScript, prefer `//` over `/*` comments. Only use `/*` if `//` makes the formatting too awkward or in JSX. Do not use JSDoc or TSDoc style comments.
115+
- Do not use comments to add headings, dividers, steps, or other structures.
116+
- Comments that need more than one line: break at sentence ends and clauses. Prettier does not reflow comment format.
117+
- Avoid excessive formatting. Only use parentheses to refer to literal syntax. Do not use markdown-style formatting. Do not use emdashes. You may use uppercase to emphasize words, rarely.
118+
- Keep comments inside a function body to a single line. Place multiline comments above the function.
119+
- Do not reference issues, pull requests, or discussions in the `github` organization, such as numbers or URLs. Include the context directly in the comment or in a nearby markdown file. You may use a full URL to an issue in an external open source project.
120+
- Do not reference line numbers or line counts. Do not reference specific versions unless a future version requires action.
121+
- Do not leave TODO, FIXME, or HACK comments.
122+
- Do not keep commented out code.
123+
- You may label deliberately absent fields.
124+
- You may write a simple input and output example for regular expressions. Use realistic data and not garbage like foo/bar or Alice/Bob.
125+
- You may use internal cross-reference identifiers in comments, such as unique error codes.
126+
- You may use tool directives such as `@ts-expect-error` or `eslint-disable` in rare cases.
127+
- You may add legally required comments like license and copyright.

‎.github/workflows/check-for-spammy-prs.yml‎

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Check for Spammy PRs
22

3-
# **What it does**: This action closes low value pull requests in the open-source repository.
3+
# **What it does**: This action closes low value pull requests and PRs that do not target main.
44
# **Why we have it**: We get lots of spam in the open-source repository.
55
# **Who does it impact**: Open-source contributors.
66

@@ -14,7 +14,7 @@ permissions:
1414

1515
jobs:
1616
spammy-pr-check:
17-
name: Label PRs that only delete files or touch a large number of files
17+
name: Label spammy PRs and reject non-main targets
1818
if: >
1919
github.repository == 'github/docs' && github.event_name == 'pull_request_target' &&
2020
github.event.pull_request.user.login != 'docs-bot'
@@ -27,6 +27,7 @@ jobs:
2727
const owner = 'github'
2828
const repo = 'docs'
2929
const pull_number = context.payload.pull_request.number
30+
const targetsNonMain = context.payload.pull_request.base.ref !== 'main'
3031
3132
const files = await github.paginate(github.rest.pulls.listFiles, {
3233
owner,
@@ -50,8 +51,8 @@ jobs:
5051
})
5152
const onlyRenames = files.length > 0 && files.every(f => f.status === 'renamed')
5253
53-
// Close the PR and add the invalid label
5454
if (
55+
targetsNonMain ||
5556
onlyDeletesLines ||
5657
onlyDeletes ||
5758
isEmptyCommit ||
@@ -66,16 +67,26 @@ jobs:
6667
labels: ['invalid'],
6768
})
6869
69-
// Comment on the PR
7070
await github.rest.issues.createComment({
7171
owner,
7272
repo,
7373
issue_number: pull_number,
74-
body: onlyDeletesLines
75-
? `This pull request only removes existing content. Before submitting a content-removal pull request, please [open an issue](https://github.com/github/docs/issues/new/choose) explaining the proposed removal and wait for approval from the GitHub Docs team. Once the change has been approved, you can open a new pull request and link it to the issue.`
76-
: `This pull request may have been opened accidentally. I'm going to close it now, but feel free to check out our [contribution guidelines](https://docs.github.com/en/contributing), or raise an issue.`,
74+
body: targetsNonMain
75+
? 'Pull requests must target the `main` branch. This pull request has been closed as invalid. If you think this is incorrect, please mention this in a corresponding issue.'
76+
: onlyDeletesLines
77+
? 'This pull request only removes existing content. Before submitting a content-removal pull request, please [open an issue](https://github.com/github/docs/issues/new/choose) explaining the proposed removal and wait for approval from the GitHub Docs team. Once the change has been approved, you can open a new pull request and link it to the issue.'
78+
: "This pull request may have been opened accidentally. I'm going to close it now, but feel free to check out our [contribution guidelines](https://docs.github.com/en/contributing), or raise an issue.",
7779
})
7880
81+
if (targetsNonMain) {
82+
await github.rest.pulls.update({
83+
owner,
84+
repo,
85+
pull_number,
86+
state: 'closed',
87+
})
88+
}
89+
7990
if (onlyDeletesLines) {
8091
core.setFailed(
8192
'This pull request only deletes lines. An approved issue is required first.',

‎.github/workflows/sync-graphql.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ jobs:
3232
env:
3333
# need to use a token from a user with access to github/github for this step
3434
GITHUB_TOKEN: ${{ secrets.DOCS_BOT_PAT_BASE }}
35+
NODE_OPTIONS: '--max-old-space-size=8192'
3536
run: npm run sync-graphql
3637
- name: Create pull request
3738
id: create-pull-request

‎.github/workflows/test.yml‎

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,31 +38,38 @@ jobs:
3838
# Note that *if you add* to this, remember to also add that
3939
# to the **required checks** in the branch protection rules.
4040
name:
41-
# src/ directory
41+
# Every directory in src/ is listed here.
42+
# A commented out entry has no test files of its own.
43+
# - ai-tools
44+
# - app
4245
- archives
4346
- article-api
4447
- assets
4548
- audit-logs
4649
- automated-pipelines
47-
# - bookmarklets
48-
# - code-scanning
49-
# - codeql-cli
50+
# - codeql-cli # enable once github/docs-internal#63239 removes the broken scratch test
51+
# - codeql-queries
5052
- color-schemes
5153
- content-linter
54+
# - content-pipelines
5255
- content-render
5356
- data-directory
57+
# - deployments
5458
# - dev-toc
5559
- early-access
60+
# - eslint-rules
5661
- events
5762
- fixtures
5863
- frame
64+
- ghes-releases
5965
- github-apps
6066
- graphql
67+
- journeys
6168
- landings
6269
- languages
63-
# - links
70+
- links
71+
# - metrics
6472
- observability
65-
# - open-source
6673
# - pages
6774
- products
6875
- redirects
@@ -73,6 +80,7 @@ jobs:
7380
- shielding
7481
# - tests
7582
# - tools
83+
# - types
7684
- versions
7785
- webhooks
7886
- workflows

‎Dockerfile‎

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -63,25 +63,22 @@ RUN --mount=type=secret,id=DOCS_BOT_PAT_BASE,mode=0444 \
6363
. ./build-scripts/fetch-repos.sh
6464

6565
# ------------------------------------------------
66-
# PROD_DEPS STAGE: Install production dependencies
66+
# ALL_DEPS STAGE: Install all dependencies
6767
# ------------------------------------------------
68-
FROM base AS prod_deps
68+
FROM base AS all_deps
6969
USER node:node
7070
WORKDIR $APP_HOME
7171

72-
# Copy what is needed to run npm ci
7372
COPY --chown=node:node package.json package-lock.json ./
74-
75-
# Install only production dependencies (skip scripts to avoid husky)
76-
RUN npm ci --omit=dev --ignore-scripts --registry https://registry.npmjs.org/
73+
COPY --chown=node:node patches patches/
74+
RUN npm ci --registry https://registry.npmjs.org/
7775

7876
# ------------------------------------------------------------
79-
# ALL_DEPS STAGE: Install all dependencies on top of prod deps
77+
# PROD_DEPS STAGE: Strip dev dependencies back out
8078
# ------------------------------------------------------------
81-
FROM prod_deps AS all_deps
79+
FROM all_deps AS prod_deps
8280

83-
# Install dev dependencies on top of production ones
84-
RUN npm ci --registry https://registry.npmjs.org/
81+
RUN npm prune --omit=dev --ignore-scripts
8582

8683
# ----------------------------------
8784
# BUILD STAGE: Build the application

‎content/code-security/reference/security-at-scale/overview-dashboard-filters.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ For more information about production context, see [AUTOTITLE](/code-security/tu
192192
|{% endif %}|
193193
|`ecosystem`|Display {% data variables.product.prodname_dependabot_alerts %} detected in a specified ecosystem, for example: `ecosystem:Maven`.|
194194
|`epss-percentage`|Display {% data variables.product.prodname_dependabot_alerts %} whose EPSS score meets the defined criteria, for example: `epss-percentage:>=0.01`|
195-
|`has`|Display {% data variables.product.prodname_dependabot_alerts %} for vulnerabilities where either a secure version is already available (`patch`) or where at least one call from the repository to a vulnerable function is detected (`vulnerable-calls`). For more information, see [AUTOTITLE](/code-security/how-tos/manage-security-alerts/manage-dependabot-alerts/view-dependabot-alerts).|
195+
|`has`|Display {% data variables.product.prodname_dependabot_alerts %} for vulnerabilities where a secure version is already available (`patch`).|
196196
|`is`|Display {% data variables.product.prodname_dependabot_alerts %} that are open (`open`) or closed (`closed`).|
197197
|`package`|Display {% data variables.product.prodname_dependabot_alerts %} detected in the specified package, for example: `package:semver`.|
198198
|`props`|Display {% data variables.product.prodname_dependabot_alerts %} for repositories with a specific custom property set. For example, `props.data_sensitivity:high` displays results for repositories with the `data_sensitivity` property set to the value `high`.|

‎content/copilot/reference/ai-models/model-hosting.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ Used for:
9595

9696
* {% data variables.copilot.copilot_grok_45 %}
9797
* {% data variables.copilot.copilot_grok_46 %}
98+
* {% data variables.copilot.copilot_grok_47 %}
9899

99100
These models are hosted on xAI. xAI operates these models in {% data variables.product.prodname_copilot %} under a zero data retention API policy. This means xAI commits that user content (both inputs sent to the model and outputs generated by the model):
100101

‎content/copilot/reference/ai-models/supported-models.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,6 @@ Some {% data variables.product.prodname_copilot_short %} models require minimum
126126
| {% data variables.copilot.copilot_gemini_36_flash %} | `v1.128.0` | `17.14.22` or `18.1.0` | TBD | TBD | TBD |
127127
| {% data variables.copilot.copilot_gemini_37_flash %} | `v1.128.0` | `17.14.22` or `18.1.0` | TBD | TBD | TBD |
128128
| {% data variables.copilot.copilot_gemini_38_flash %} | TBD | `17.14.22` or `18.1.0` | TBD | TBD | TBD |
129-
| {% data variables.copilot.copilot_gpt_52_codex %} | No minimum listed | `17.14.19` or `18.0.0` | `1.5.61` | `0.45.0` | `0.13.0` |
130129
| {% data variables.copilot.copilot_gpt_53_codex %} | `v1.104.1` | `17.14.19` | `1.5.61` | `0.45.0` | `0.13.0` |
131130
| {% data variables.copilot.copilot_gpt_54 %} | `v1.104.1` | `17.14.19` | `1.5.66` | `0.47.0` | `0.15.0` |
132131
| {% data variables.copilot.copilot_gpt_54_mini %} | `v1.104.1` | `17.14.19` | `1.5.66` | `0.47.0` | `0.15.0` |
@@ -145,6 +144,7 @@ Some {% data variables.product.prodname_copilot_short %} models require minimum
145144
| {% data variables.copilot.copilot_mai_code_1_1_flash %} | `v1.121` | TBD | TBD | TBD | TBD |
146145
| {% data variables.copilot.copilot_grok_45 %} | TBD | `17.14.19` | TBD | TBD | TBD |
147146
| {% data variables.copilot.copilot_grok_46 %} | TBD | TBD | TBD | TBD | TBD |
147+
| {% data variables.copilot.copilot_grok_47 %} | TBD | `17.14.19` | TBD | TBD | TBD |
148148

149149
{% endrowheaders %}
150150

‎content/copilot/reference/copilot-cli-reference/cli-command-reference.md‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ These are the slash commands you can use from within an interactive CLI session.
491491
| `/search [QUERY]`, `/find [QUERY]` | Search the conversation timeline. |
492492
| `/security-review [PROMPT]` | Run a focused security review of active local code changes and return prioritized vulnerability findings with remediation suggestions. This command is not a full repository security audit. |
493493
| `/session [info\|checkpoints [n]\|files\|plan\|rename [NAME]\|cleanup\|prune\|delete [ID]\|delete-all]`, `/sessions [info\|checkpoints [n]\|files\|plan\|rename [NAME]\|cleanup\|prune\|delete [ID]\|delete-all]` | Show session information and manage sessions. The `info` subcommand shows session details including the session link (when available). Subcommands: `info`, `checkpoints`, `files`, `plan`, `rename`, `cleanup`, `prune`, `delete`, `delete-all`. |
494-
| `/settings [--repo\|--local] [show KEY\|KEY\|KEY VALUE]`,<br>`/config [--repo\|--local] [show KEY\|KEY\|KEY VALUE]` | Open the settings dialog, open it focused on a specific setting (`KEY`), set a setting inline (`KEY VALUE`), or display a setting's current value (`show KEY`). `show` masks secret-named values (for example, tokens or API keys nested under a setting) instead of printing them in clear text. The dialog shows **User**, **Repo**, **Repo (local)**, and **Problems** tabs—switch with <kbd>Tab</kbd>/<kbd>Shift</kbd>+<kbd>Tab</kbd>; a setting overridden in another scope shows a badge naming which scope wins. The **Problems** tab is a cross-scope view of settings that need attention (for example, unknown or invalid keys); its label shows a count, such as `Problems (2)`, when any scope has an issue, and otherwise just reads `Problems`. Add `--repo` or `--local` to target `.github/copilot/settings.json` or `.github/copilot/settings.local.json` instead of the user settings file—for example, `/settings --repo model gpt-5.2`. Only [repo-overridable keys](/copilot/reference/copilot-cli-reference/cli-config-dir-reference#repository-settings-githubcopilotsettingsjson) can be set this way. Rows governed by an active organization or MDM managed policy render read-only with a `(managed)` tag. See [AUTOTITLE](/copilot/how-tos/copilot-cli/customize-copilot/change-settings). |
494+
| `/settings [--repo\|--local] [show KEY\|KEY\|KEY VALUE]`,<br>`/config [--repo\|--local] [show KEY\|KEY\|KEY VALUE]` | Open the settings dialog, open it focused on a specific setting (`KEY`), set a setting inline (`KEY VALUE`), or display a setting's current value (`show KEY`). `show` masks secret-named values (for example, tokens or API keys nested under a setting) instead of printing them in clear text. The dialog shows **User**, **Repo**, **Repo (local)**, and **Problems** tabs—switch with <kbd>Tab</kbd>/<kbd>Shift</kbd>+<kbd>Tab</kbd>; a setting overridden in another scope shows a badge naming which scope wins. The **Problems** tab is a cross-scope view of settings that need attention (for example, unknown or invalid keys); its label shows a count, such as `Problems (2)`, when any scope has an issue, and otherwise just reads `Problems`. Add `--repo` or `--local` to target `.github/copilot/settings.json` or `.github/copilot/settings.local.json` instead of the user settings file—for example, `/settings --repo model gpt-6-astra`. Only [repo-overridable keys](/copilot/reference/copilot-cli-reference/cli-config-dir-reference#repository-settings-githubcopilotsettingsjson) can be set this way. Rows governed by an active organization or MDM managed policy render read-only with a `(managed)` tag. See [AUTOTITLE](/copilot/how-tos/copilot-cli/customize-copilot/change-settings). |
495495
| `/share [link\|off\|file\|html\|gist\|research] [...]`, `/export [...]` | Share the current session. With no subcommand, generates a shareable {% data variables.product.github %} link when you're logged in and synced (falls back to Markdown file export otherwise). `off` stops sharing. `link` is an explicit alias for the default link flow; `link off` stops link sharing. `file [session\|research] [PATH]` exports to a Markdown file. `html [session\|research] [PATH]` exports to an HTML file. `gist [session\|research]` creates a {% data variables.product.github %} gist. `research [PATH]` exports the research report. |
496496
| `/skills` | Open the plugins dashboard on the Skills tab. |
497497
| `/skills list` | List all available skills. |
@@ -667,7 +667,6 @@ Use `--model=MODEL` or the `COPILOT_MODEL` environment variable to select the AI
667667
| `gpt-6-astra` | New model, opt-in (not the automatic default) |
668668
| `claude-haiku-4.5` | Fast, lightweight operations |
669669
| `gpt-5.3-codex` | Code-focused tasks |
670-
| `gemini-3.1-pro-preview` | Google Gemini reasoning |
671670
| `gemini-3.5-flash` | Fast Google Gemini responses |
672671
| `gemini-3.6-flash` | Fast Google Gemini responses |
673672
| `gemini-3.7-flash` | Fast Google Gemini responses |

‎content/copilot/reference/copilot-cli-reference/cli-config-dir-reference.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -576,8 +576,8 @@ Each line is a glob pattern matched against model IDs, or a `fallback:` directiv
576576

577577
```text
578578
# .github/allowed_models.txt
579-
fallback: gpt-5.2
580-
gpt-5.2
579+
fallback: gpt-6-astra
580+
gpt-6-astra
581581
gpt-5.4
582582
claude-sonnet-*
583583
```

0 commit comments

Comments
 (0)