Skip to content

Commit b630ef0

Browse files
Merge branch 'main' into patch-1
2 parents 1d8d6f4 + 12a0f81 commit b630ef0

851 files changed

Lines changed: 12262 additions & 25474 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/actions/labeler/labeler.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ import coreLib from '@actions/core'
44
import { type Octokit } from '@octokit/rest'
55
import { CoreInject } from '@/links/scripts/action-injections'
66

7-
import github from '#src/workflows/github.ts'
8-
import { getActionContext } from '#src/workflows/action-context.ts'
9-
import { boolEnvVar } from '#src/workflows/get-env-inputs.ts'
7+
import github from '@/workflows/github'
8+
import { getActionContext } from '@/workflows/action-context'
9+
import { boolEnvVar } from '@/workflows/get-env-inputs'
1010

1111
type Options = {
1212
addLabels?: string[]

.github/copilot-instructions.md

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
This documentation repository consists mainly of content written in Markdown format. These files are converted into HTML for displaying on a website. Most Markdown files become a single article on the documentation site. Other files contain reusable content which is inserted into multiple articles. The repository also contains YAML files (e.g. for variable text), image files, JavaScript/TypeScript files, etc.
2+
3+
## Content guidelines
4+
5+
### Bullet lists
6+
7+
The bulleted points in a bullet list should always be denoted in Markdown using an asterisk, not a hyphen.
8+
9+
### Using variables
10+
11+
Within Markdown files, with the exception of the `title` field in the metadata at the start of a file, **always use the Liquid syntax variables rather than text** if a variable has been defined for that text. This ensures consistency and makes it easier to update product names globally.
12+
13+
**Important**: Variables must be used in all content, including reusable content, data files, and regular articles. The only exception is the `title` field in frontmatter metadata.
14+
15+
For example:
16+
17+
| Use this variable | Don't use this text | File where variable is defined |
18+
| -------------------------------------------------------- | ------------------------ | -------------------------------- |
19+
| `{% data variables.product.github %}` | GitHub | data/variables/product.yml |
20+
| `{% data variables.product.prodname_ghe_server %}` | GitHub Enterprise Server | data/variables/product.yml |
21+
| `{% data variables.product.prodname_copilot_short %}` | Copilot | data/variables/product.yml |
22+
| `{% data variables.product.prodname_copilot %}` | GitHub Copilot | data/variables/product.yml |
23+
| `{% data variables.copilot.copilot_code-review_short %}` | Copilot code review | data/variables/copilot.yml |
24+
| `{% data variables.enterprise.prodname_managed_user %}` | managed user account | data/variables/enterprise.yml |
25+
| `{% data variables.code-scanning.codeql_workflow %}` | CodeQL analysis workflow | data/variables/code-scanning.yml |
26+
27+
There are many more variables. These are stored in various YAML files within the `data/variables` directory.
28+
29+
**How to find variables**: Check the `data/variables` directory for existing variables before writing hardcoded text. Common variable files include:
30+
31+
* `data/variables/product.yml` - Product names and variations
32+
* `data/variables/copilot.yml` - Copilot-specific terms
33+
* `data/variables/enterprise.yml` - Enterprise-specific terms
34+
* `data/variables/code-scanning.yml` - Code scanning terms
35+
36+
### Reusable text
37+
38+
Reusables are long strings of reusable text, such as paragraphs or procedural lists, that are referenced in multiple content files. This makes it easier for us to maintain content and ensure that it is accurate across all files where the content is needed.
39+
40+
Each reusable lives in its own Markdown file. The path and filename of each reusable determines what its path will be in the data object. For example, a file named `/data/reusables/foo/bar.md` will be accessible as `{% data reusables.foo.bar %}` in articles.
41+
42+
Examples where you should create a reusable:
43+
44+
* You are documenting a new feature for a public preview. You need to create a note to display in all new articles about the new feature. Create a new reusable for the note and use it in all articles where it is needed.
45+
* You are documenting billing for a new feature and need to briefly mention how the feature is billed and link to content about billing in several articles. Create a new reusable with the brief mention and a link to the content on billing. Aim to use the reusable in all places where you want to mention billing for the feature.
46+
47+
### Links to other articles
48+
49+
`[AUTOTITLE]` is the **only correct way** to specify the title of a linked article when that article is another page on the docs.github.com site.
50+
51+
You can replace the placeholder link text `[AUTOTITLE]` only when linking to an anchor in the same article or when linking to an anchor in another article and the actual article title would be confusing.
52+
53+
Never use the `{% link %}` Liquid tag for internal documentation links. The `[AUTOTITLE]` placeholder automatically pulls the correct title and ensures links remain valid when titles change.
54+
55+
Examples:
56+
57+
* ✅ Correct: `For more information, see [AUTOTITLE](/copilot/using-github-copilot).`
58+
* ❌ Incorrect: `For more information, see [Using GitHub Copilot](/copilot/using-github-copilot).`
59+
* ❌ Incorrect: `For more information, see {% link /copilot/using-github-copilot %}.`
60+
61+
### Creating a pull request
62+
63+
When creating a pull request as a result of a request to do so in Copilot Chat, the first line of the PR description should **always** be the following (in italics):
64+
65+
`_This pull request was created as a result of the following prompt in Copilot Chat._`
66+
67+
Then, within a collapsed section, quote the original prompt from Copilot Chat:
68+
69+
```markdown
70+
<details>
71+
<summary>Original prompt - submitted by @GITHUB-USER-ID</summary>
72+
73+
> [Original prompt text here]
74+
75+
</details>
76+
```
77+
78+
This helps reviewers understand the context and intent behind the automated changes.
79+
80+
## Development and testing guidelines
81+
82+
### Content changes
83+
84+
Before committing content changes, always:
85+
86+
1. **Use the content linter** to validate content: `npm run lint-content -- --paths <file-paths>`
87+
2. **Check for proper variable usage** in your content
88+
3. **Verify [AUTOTITLE] links** point to existing articles
89+
4. **Run tests** on changed content: `npm run test -- src/content-render/tests/render-changed-and-deleted-files.js`
90+
91+
### Script and code changes
92+
93+
For TypeScript, JavaScript, and SCSS files:
94+
95+
1. **Run Prettier** to check formatting: `npm run prettier-check`
96+
2. **Run the linter**: `npm run lint`
97+
3. **Run TypeScript checks**: `npm run tsc`
98+
4. **Run relevant tests**: `npm test`
99+
100+
### Environment setup
101+
102+
When testing changes in your development environment:
103+
104+
1. Install dependencies: `npm ci`
105+
2. For content changes, ensure the content linter runs successfully
106+
3. For script changes, ensure all formatting and linting checks pass
107+
4. Always verify your changes don't break existing functionality

.github/workflows/generate-code-scanning-query-lists.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ jobs:
8787
8888
- name: Build code scanning query list
8989
run: |
90-
for lang in "actions" "cpp" "csharp" "go" "java" "javascript" "python" "ruby" "swift"; do
90+
for lang in "actions" "cpp" "csharp" "go" "java" "javascript" "python" "ruby" "rust" "swift"; do
9191
echo "Generating code scanning query list for $lang"
9292
npm run generate-code-scanning-query-list -- \
9393
--verbose \

.github/workflows/index-autocomplete-search.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Index autocomplete search in Elasticsearch
22

3-
# **What it does**: Indexes autocomplete data (general and AI search) into Elasticsearch.
4-
# **Why we have it**: So we can power the APIs for autocomplete.
3+
# **What it does**: Indexes AI search autocomplete data into Elasticsearch.
4+
# **Why we have it**: So we can power the APIs for AI search autocomplete.
55
# **Who does it impact**: docs-engineering
66

77
on:
@@ -40,11 +40,6 @@ jobs:
4040
if: ${{ github.event_name == 'pull_request' }}
4141
run: curl --fail --retry-connrefused --retry 5 -I http://localhost:9200
4242

43-
- name: Run general auto-complete indexing
44-
env:
45-
ELASTICSEARCH_URL: ${{ github.event_name == 'pull_request' && 'http://localhost:9200' || secrets.ELASTICSEARCH_URL }}
46-
run: npm run index-general-autocomplete -- docs-internal-data
47-
4843
- name: Run AI search auto-complete indexing
4944
env:
5045
ELASTICSEARCH_URL: ${{ github.event_name == 'pull_request' && 'http://localhost:9200' || secrets.ELASTICSEARCH_URL }}

.github/workflows/index-general-search.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,9 @@ jobs:
108108
# the whole job fast.
109109
# As of June 2023, it takes about 10+ minutes to index one whole
110110
# language and we have 8 non-English languages.
111-
max-parallel: 3
111+
# As of May 2025, we index so many pages that we are being rate-limited by
112+
# Elasticsearch. So we are shrinking this value to 2, down from 3
113+
max-parallel: 2
112114
matrix:
113115
language: ${{ fromJSON(needs.figureOutMatrix.outputs.matrix) }}
114116
steps:

.github/workflows/reviewers-content-systems.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ name: Reviewers - Content Systems
66

77
on:
88
pull_request:
9+
types:
10+
- edited
11+
- opened
12+
- ready_for_review
13+
- reopened
14+
- synchronize
915
paths:
1016
- 'contributing/content-*.md'
1117
- 'content/contributing/**.md'
@@ -29,7 +35,9 @@ jobs:
2935
GH_TOKEN: ${{ secrets.DOCS_BOT_PAT_BASE }}
3036

3137
steps:
38+
- name: Checkout repository
39+
uses: actions/checkout@v4
40+
3241
- name: Add content systems as a reviewer
3342
run: |
34-
gh pr edit $PR --add-reviewer github/docs-content-systems
35-
gh pr edit $PR --add-label reviewers-content-systems
43+
gh pr edit $PR --add-reviewer github/docs-content-systems --add-label reviewers-content-systems

.github/workflows/reviewers-dependabot.yml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ name: Reviewers - Dependabot
66

77
on:
88
pull_request:
9+
types:
10+
- edited
11+
- opened
12+
- ready_for_review
13+
- reopened
14+
- synchronize
915
paths:
1016
- 'data/reusable/dependabot/**'
1117
- 'content/code-security/dependabot/**'
@@ -18,19 +24,21 @@ permissions:
1824
repository-projects: read
1925

2026
jobs:
21-
add-reviewer:
27+
reviewers-dependabot:
2228
if: >-
2329
${{ github.repository == 'github/docs-internal' &&
2430
!github.event.pull_request.draft &&
2531
!contains(github.event.pull_request.labels.*.name, 'reviewers-dependabot') &&
2632
github.event.pull_request.head.ref != 'repo-sync' }}
2733
runs-on: ubuntu-latest
2834
env:
29-
GH_TOKEN: ${{ secrets.DOCS_BOT_PAT_BASE }}
3035
PR: ${{ github.event.pull_request.html_url }}
36+
GH_TOKEN: ${{ secrets.DOCS_BOT_PAT_BASE }}
3137

3238
steps:
33-
- name: Add Dependabot Core Maintainers as reviewers
39+
- name: Checkout repository
40+
uses: actions/checkout@v4
41+
42+
- name: Add dependabot as a reviewer
3443
run: |
35-
gh pr edit $PR --add-reviewer github/dependabot-updates-reviewers
36-
gh pr edit $PR --add-label reviewers-dependabot
44+
gh pr edit $PR --add-reviewer github/dependabot-updates-reviewers --add-label reviewers-dependabot

.github/workflows/reviewers-docs-engineering.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ permissions:
3535
repository-projects: read
3636

3737
jobs:
38-
codeowners-docs-engineering:
38+
reviewers-docs-engineering:
3939
if: >-
4040
${{ github.repository == 'github/docs-internal' &&
4141
!github.event.pull_request.draft &&
@@ -47,7 +47,9 @@ jobs:
4747
GH_TOKEN: ${{ secrets.DOCS_BOT_PAT_BASE }}
4848

4949
steps:
50+
- name: Checkout repository
51+
uses: actions/checkout@v4
52+
5053
- name: Add docs engineering as a reviewer
5154
run: |
52-
gh pr edit $PR --add-reviewer github/docs-engineering
53-
gh pr edit $PR --add-label reviewers-docs-engineering
55+
gh pr edit $PR --add-reviewer github/docs-engineering --add-label reviewers-docs-engineering

.github/workflows/reviewers-legal.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,16 @@ permissions:
2323
repository-projects: read
2424

2525
jobs:
26-
codeowners-legal:
26+
reviewers-legal:
2727
if: >-
2828
${{ github.repository == 'github/docs-internal' &&
2929
!github.event.pull_request.draft &&
3030
!contains(github.event.pull_request.labels.*.name, 'reviewers-legal') &&
3131
github.event.pull_request.head.ref != 'repo-sync' }}
3232
runs-on: ubuntu-latest
3333
steps:
34-
- name: Check out repo
35-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
34+
- name: Checkout repository
35+
uses: actions/checkout@v4
3636

3737
- name: Get changed files
3838
id: changed_files
@@ -52,11 +52,10 @@ jobs:
5252
CHANGED_FILE_PATHS: ${{ steps.changed_files.outputs.filtered_changed_files }}
5353
CONTENT_TYPE: 'rai'
5454

55-
- name: Check for reviewers-legal label, add if missing and request review
55+
- name: Add legal as a reviewer
5656
if: steps.checkContentType.outputs.containsContentType == 'true'
5757
env:
5858
GH_TOKEN: ${{ secrets.DOCS_BOT_PAT_BASE }}
5959
PR: ${{ github.event.pull_request.html_url }}
6060
run: |
61-
gh pr edit $PR --add-reviewer github/legal-product
62-
gh pr edit $PR --add-label reviewers-legal
61+
gh pr edit $PR --add-reviewer github/legal-product --add-label reviewers-legal

.github/workflows/sync-audit-logs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ jobs:
8787
echo "Creating pull request..."
8888
gh pr create \
8989
--title "Update audit log event data" \
90-
--body '👋 humans. This PR updates the audit log event data with the latest changes. (Synced from github/audit-log-allowlists)
91-
90+
--body '👋 Docs First Responder. This PR updates the audit log event data with the latest changes, synced from github/audit-log-allowlists.
91+
Make sure the PR builds successfully and there are no gross errors (for example, a file is deleted). You do not need to validate the contents (that is the responsibility of product teams).
9292
If CI does not pass or other problems arise, contact #docs-engineering on slack.' \
9393
--repo github/docs-internal \
9494
--label audit-log-pipeline \

0 commit comments

Comments
 (0)