Skip to content

Commit a3914fd

Browse files
Merge branch 'main' into patch-1
2 parents 4480fb9 + 295c65e commit a3914fd

2,061 files changed

Lines changed: 770793 additions & 2510050 deletions

File tree

Some content is hidden

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

.github/copilot-instructions.md

Lines changed: 0 additions & 22 deletions
This file was deleted.

.github/dependabot.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ updates:
3131
day: tuesday
3232
cooldown:
3333
default-days: 7
34+
groups:
35+
actions:
36+
patterns:
37+
- '*'
3438
ignore:
3539
- dependency-name: '*'
3640
update-types:

.github/instructions/all.instructions.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ applyTo: "**"
44

55
# Copilot instructions for docs.github.com
66

7-
This repository contains code to run the GitHub Docs site on docs.github.com, as well as the content that the site displays. We write the code in JavaScript and TypeScript, and we write the content primarily in Markdown.
7+
This repository powers the GitHub Docs site (docs.github.com). It contains both the Next.js application code (TypeScript) and the documentation content (Markdown).
88

99
## Creating a pull request
1010

@@ -29,6 +29,8 @@ When you create a pull request:
2929
3. Label with "llm-generated".
3030
4. If an issue exists, include "fixes owner/repo#issue" or "towards owner/repo#issue" as appropriate.
3131
5. Always create PRs in **draft mode** using `--draft` flag.
32+
6. Do not commit directly to `main`.
33+
7. Whenever you create or comment on an issue or pull request, indicate you are GitHub Copilot.
3234

3335
## Accessing docs.github.com content programmatically
3436

.github/instructions/code.instructions.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,11 @@ For code reviews, follow guidelines, tests, and validate instructions. For creat
1111
- If available, use ripgrep (`rg`) instead of `grep`.
1212
- When using gh cli in double-quoted strings, escape backticks to prevent bash command substitution. In single-quoted strings, backticks do not need escaping.
1313
- All scripts should be listed in `package.json` and use `tsx`.
14-
- Whenever you create or comment on an issue or pull request, indicate you are GitHub Copilot.
1514
- Be careful fetching full HTML pages off the internet. Prefer to use MCP or gh cli whenever possible for github.com. Limit the number of tokens when grabbing HTML.
1615
- Avoid pull requests with over 300 lines of code changed. When significantly larger, offer to split up into smaller pull requests if possible.
1716
- All new code should be written in TypeScript and not JavaScript.
1817
- We use absolute imports, relative to the `src` directory, using the `@` symbol. For example, `getRedirect` which lives in `src/redirects/lib/get-redirect.ts` can be imported with `import getRedirect from '@/redirects/lib/get-redirect'`. The same rule applies for TypeScript (`.ts`) imports, e.g. `import type { GeneralSearchHit } from '@/search/types'`
1918
- For updates to the content linter, read important information in `src/content-linter/README.md`.
20-
- Do not commit to `main` branch.
2119
- Do not use git force push, and avoid git rebase.
2220

2321
## Tests

.github/instructions/style-guide-summary.instructions.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ applyTo: "content/**,data/**,**/*.md"
66

77
**When to use**: Any content editing, documentation writing, or Markdown file changes. This is a condensed version of the full style guide at `/content/contributing/style-guide-and-content-model/style-guide.md`. Use these rules for routine work. Only consult the full style guide if you encounter a style question not covered here.
88

9-
For Liquid variable usage, reusables, linking conventions, bullet-list formatting, and parenthetical dashes, see `content.instructions.md` (loaded automatically alongside this file).
9+
For Liquid variable usage, reusables, linking conventions, bullet-list markers, and parenthetical dashes, see `content.instructions.md` (loaded automatically alongside this file).
1010

1111
## Core principles
1212

@@ -52,15 +52,13 @@ For Liquid variable usage, reusables, linking conventions, bullet-list formattin
5252

5353
## Links
5454

55-
* Use `[AUTOTITLE](/path/to/article)` for all internal links. Never hardcode article titles in link text.
5655
* Introduce links with "For more information, see" or "See" when context is clear.
5756
* Do not use inline links where words within a sentence are hyperlinked without additional context.
5857
* Do not include punctuation inside a hyperlink.
5958
* Do not repeat the same link more than once in the same article.
6059

6160
## Lists
6261

63-
* Use `*` (asterisks) for unordered lists, never `-` (hyphens).
6462
* Capitalize the first letter of each list item.
6563
* Use periods only if the item is a complete sentence.
6664
* Introduce lists with a descriptive sentence, not vague phrases like "the following" in isolation.
@@ -83,9 +81,8 @@ For Liquid variable usage, reusables, linking conventions, bullet-list formattin
8381
* Use full words for Apple modifier keys (`Command`, `Option`, `Control`), not symbols.
8482
* Capitalize letter keys.
8583

86-
## Product names and variables
84+
## Product names
8785

88-
* Always use Liquid variables for product names—never hardcode them. Check `data/variables/product.yml` and `data/variables/copilot.yml`.
8986
* Product names are always singular (for example, "GitHub Actions helps" not "help").
9087

9188
## Word choice

.github/workflows/benchmark-pages.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,9 @@ jobs:
116116
echo ""
117117
echo "### Errors"
118118
echo ""
119-
echo "| Status | Mode | Path |"
120-
echo "|--------|------|------|"
121-
jq -r '.errors[] | "| \(.status) | \(.mode) | \(.path) |"' /tmp/benchmark-results.json
119+
echo "| Status | Mode | Path | Error |"
120+
echo "|--------|------|------|-------|"
121+
jq -r '.errors[] | "| \(.status) | \(.mode) | \(.path) | \(.errorBody // "" | gsub("\\|"; "\\|") | gsub("\r"; " ") | gsub("\n"; " ")) |"' /tmp/benchmark-results.json
122122
} >> "$BODY_FILE"
123123
fi
124124

.github/workflows/changelog-agent.yml

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -112,10 +112,12 @@ jobs:
112112
if: steps.check_team.outputs.is_team_member == 'true'
113113
id: extract_issue
114114
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
115+
env:
116+
PR_BODY: ${{ steps.resolve_pr.outputs.pr_body }}
115117
with:
116118
github-token: ${{ secrets.DOCS_BOT_PAT_BASE }}
117119
script: |
118-
const body = `${{ steps.resolve_pr.outputs.pr_body }}`;
120+
const body = process.env.PR_BODY || '';
119121
120122
// Match closing keywords followed by docs-content issue references.
121123
// Supports: closes github/docs-content#123, fixes https://github.com/github/docs-content/issues/123
@@ -224,6 +226,10 @@ jobs:
224226
if: steps.check_parent.outputs.has_parent == 'true'
225227
id: gather_context
226228
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
229+
env:
230+
PR_TITLE: ${{ steps.resolve_pr.outputs.pr_title }}
231+
PR_BODY: ${{ steps.resolve_pr.outputs.pr_body }}
232+
PR_URL: ${{ steps.resolve_pr.outputs.pr_url }}
227233
with:
228234
github-token: ${{ secrets.DOCS_BOT_PAT_BASE }}
229235
script: |
@@ -254,9 +260,9 @@ jobs:
254260
const changedFiles = files.map(f => f.filename);
255261
256262
core.setOutput('pr_author', prAuthor);
257-
core.setOutput('pr_title', '${{ steps.resolve_pr.outputs.pr_title }}');
258-
core.setOutput('pr_body', `${{ steps.resolve_pr.outputs.pr_body }}`);
259-
core.setOutput('pr_url', '${{ steps.resolve_pr.outputs.pr_url }}');
263+
core.setOutput('pr_title', process.env.PR_TITLE || '');
264+
core.setOutput('pr_body', process.env.PR_BODY || '');
265+
core.setOutput('pr_url', process.env.PR_URL || '');
260266
core.setOutput('pr_number', prNumber.toString());
261267
core.setOutput('approved_reviewers', approvedReviewers.join(','));
262268
core.setOutput('changed_files', changedFiles.join('\n'));
@@ -321,10 +327,6 @@ jobs:
321327
with:
322328
node-version-file: 'package.json'
323329

324-
- name: Install Copilot CLI
325-
if: steps.check_parent.outputs.has_parent == 'true' && steps.check_existing.outputs.exists == 'false'
326-
run: npm install -g @github/copilot@prerelease
327-
328330
- name: Prepare prompts for LLM
329331
if: steps.check_parent.outputs.has_parent == 'true' && steps.check_existing.outputs.exists == 'false'
330332
id: prepare_prompts
@@ -425,14 +427,19 @@ jobs:
425427
- name: Dry run summary
426428
if: steps.generate_draft.outputs.response != '' && inputs.dry_run == true
427429
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
430+
env:
431+
PR_AUTHOR: ${{ steps.gather_context.outputs.pr_author }}
432+
PR_URL: ${{ steps.gather_context.outputs.pr_url }}
433+
PARENT_TITLE: ${{ steps.check_parent.outputs.parent_title }}
434+
DRAFT: ${{ steps.generate_draft.outputs.response }}
428435
with:
429436
script: |
430437
core.info('=== DRY RUN — no PR will be created, no Slack DM sent ===');
431-
core.info(`PR author: ${{ steps.gather_context.outputs.pr_author }}`);
432-
core.info(`Source PR: ${{ steps.gather_context.outputs.pr_url }}`);
433-
core.info(`Parent issue: ${{ steps.check_parent.outputs.parent_title }}`);
438+
core.info(`PR author: ${process.env.PR_AUTHOR || ''}`);
439+
core.info(`Source PR: ${process.env.PR_URL || ''}`);
440+
core.info(`Parent issue: ${process.env.PARENT_TITLE || ''}`);
434441
core.info('--- Generated changelog draft ---');
435-
core.info(`${{ steps.generate_draft.outputs.response }}`);
442+
core.info((process.env.DRAFT || '').replace(/^::/gm, ': :'));
436443
core.info('--- End of draft ---');
437444
438445
- name: Create changelog PR in docs-content

.github/workflows/content-pipelines.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,12 +161,20 @@ jobs:
161161
PR_BODY="_GitHub Copilot generated this pull request._"$'\n\n'
162162
PR_BODY+="> [!NOTE]"$'\n'
163163
PR_BODY+="> This PR is **automatically generated** by the [content pipeline update workflow](${{ github.server_url }}/${{ github.repository }}/actions/workflows/content-pipelines.yml). Each run adds a new commit with any documentation changes detected."$'\n\n'
164+
PR_BODY+="> [!WARNING]"$'\n'
165+
PR_BODY+="> **Review with care before merging.** The agent generally does a good job, but these PRs can contain:"$'\n'
166+
PR_BODY+="> * Information customers don't need to know"$'\n'
167+
PR_BODY+="> * Internal or feature-flagged details that shouldn't be public"$'\n'
168+
PR_BODY+="> * Excessive or low-value detail"$'\n'
169+
PR_BODY+=">"$'\n'
170+
PR_BODY+="> Cross-check changes against the source docs linked below. If in doubt, leave the review to a subject-matter expert on the docs team."$'\n\n'
164171
PR_BODY+="## What this does"$'\n\n'
165172
PR_BODY+="Runs the \`content-pipeline-update\` agent (${PIPELINE_ID}) against the latest source docs and updates official articles under \`content/\` that have fallen out of sync."$'\n\n'
166173
PR_BODY+="## Source changes"$'\n\n'
167174
PR_BODY+="${SOURCE_LINK}"$'\n\n'
168175
PR_BODY+="## Review"$'\n\n'
169-
PR_BODY+="* Review each commit for accuracy — the agent uses AI, so spot-check important changes"$'\n'
176+
PR_BODY+="* Review each commit for accuracy — the agent uses AI, so spot-check important changes against the source docs"$'\n'
177+
PR_BODY+="* Watch especially for invented examples, internal-only content, and excessive detail (see warning above)"$'\n'
170178
PR_BODY+="* To adjust agent behavior, see [Modifying results](${{ github.server_url }}/${{ github.repository }}/blob/main/src/content-pipelines/README.md#modifying-results)"$'\n'
171179
PR_BODY+="* Once satisfied, merge to keep docs up to date"$'\n'
172180
PR_BODY+="* A new PR will be created on the next run if there are further changes"

.github/workflows/create-changelog-pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
runs-on: ubuntu-latest
2424

2525
steps:
26-
- uses: actions/checkout@v6.0.1
26+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
2727

2828
- name: 'Ensure ${{ env.CHANGELOG_FILE }} exists'
2929
run: |

.github/workflows/first-responder-v2-prs-collect.yml

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

2525
steps:
2626
- name: Checkout repository
27-
uses: actions/checkout@v6.0.1
27+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
2828

2929
# Add to the FR project
3030
# and set type to "Maintenance"

0 commit comments

Comments
 (0)