Skip to content

Commit 47412c1

Browse files
authored
Merge pull request #39245 from github/repo-sync
Repo sync
2 parents 56b987f + d55ef4d commit 47412c1

File tree

373 files changed

+1285
-1301
lines changed

Some content is hidden

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

373 files changed

+1285
-1301
lines changed

.github/copilot-instructions.md

Lines changed: 42 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,44 @@
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.
1+
This repository contains code to run the GitHub Docs site on docs.github.com, as well as the content that is displayed on the site. The code is written in JavaScript and TypeScript, and the content is primarily written in Markdown.
2+
3+
Changes to files in `src/*` or files with `.ts` or `.js` extensions are likely code-related changes. Please follow the engineering guidelines below when making changes to these files.
4+
5+
Changes to files in `content/*` and `data/*` are likely content-related changes. Content changes include updates to articles, reusable content, and data files that define variables used in articles. Please follow the content guidelines below when making changes to these files.
6+
7+
## Engineering guidelines
8+
9+
### Scripts
10+
11+
All scripts can be found in `package.json`.
12+
13+
To validate any code changes:
14+
- `npm run tsc`
15+
- `npm run build`
16+
- `npm run prettier`
17+
- `npm run lint`: you can include `-- --fix`
18+
19+
To validate specific changes,
20+
- `npm run test`: For all unit tests
21+
- You can pass specific paths, e.g. `npm run test -- src/search/tests/ai-search-proxy`
22+
- You can add `--silent=false` to include `console.log` debugging.
23+
- `npm run build && npm run playwright-test -- playwright-rendering`: You need to build for changes outside of the test to be picked up. We use playwright for all rendering and end-to-end tests
24+
- You can add `--ui` to keep open `localhost:4000` which can be viewed in a simple browser for debugging UI state.
25+
- `npm run dev` to start the development server on `localhost:4000`.
26+
27+
### Imports
28+
29+
We use absolute imports, relative to the `src` directory, using the `@` symbol.
30+
31+
For example, `getRedirect` which lives inn `src/redirects/lib/get-redirect.js` can be imported with `import getRedirect from '@/redirects/lib/get-redirect'`.
32+
33+
The same rule applies for TypeScript (`.ts`) imports, e.g. `import type { GeneralSearchHit } from '@/search/types'`
34+
35+
### Testing changes
36+
37+
We use `vitest` to write unit tests. Tests live in their own files in the `tests` subdirectory of a source (src) directory, e.g. `src/search/tests/api-ai-search.ts`.
38+
39+
For integration tests, we can use the mock server in `src/tests/mocks/start-mock-server.ts` to mock exteneral requests.
40+
41+
For UI rendering tests, we use `playwright` and write tests in `src/fixtures/tests/playwright-rendering.spec.ts`
242

343
## Content guidelines
444

@@ -90,31 +130,11 @@ Then, within a collapsed section, quote the original prompt from Copilot Chat:
90130

91131
This helps reviewers understand the context and intent behind the automated changes.
92132

93-
## Development and testing guidelines
94-
95-
### Content changes
133+
### Testing Content changes
96134

97135
Before committing content changes, always:
98136

99137
1. **Use the content linter** to validate content: `npm run lint-content -- --paths <file-paths>`
100138
2. **Check for proper variable usage** in your content
101139
3. **Verify [AUTOTITLE] links** point to existing articles
102140
4. **Run tests** on changed content: `npm run test -- src/content-render/tests/render-changed-and-deleted-files.js`
103-
104-
### Script and code changes
105-
106-
For TypeScript, JavaScript, and SCSS files:
107-
108-
1. **Run Prettier** to check formatting: `npm run prettier-check`
109-
2. **Run the linter**: `npm run lint`
110-
3. **Run TypeScript checks**: `npm run tsc`
111-
4. **Run relevant tests**: `npm test`
112-
113-
### Environment setup
114-
115-
When testing changes in your development environment:
116-
117-
1. Install dependencies: `npm ci`
118-
2. For content changes, ensure the content linter runs successfully
119-
3. For script changes, ensure all formatting and linting checks pass
120-
4. Always verify your changes don't break existing functionality

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# ---------------------------------------------------------------
99
# To update the sha:
1010
# https://github.com/github/gh-base-image/pkgs/container/gh-base-image%2Fgh-base-noble
11-
FROM ghcr.io/github/gh-base-image/gh-base-noble:20250707-185623-g8becf904e AS base
11+
FROM ghcr.io/github/gh-base-image/gh-base-noble:20250709-201453-g6a417ef5f AS base
1212

1313
# Install curl for Node install and determining the early access branch
1414
# Install git for cloning docs-early-access & translations repos
Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: About continuous integration with GitHub Actions
2+
title: Continuous integration
33
intro: 'You can create custom continuous integration (CI) workflows directly in your {% data variables.product.prodname_dotcom %} repository with {% data variables.product.prodname_actions %}.'
44
redirect_from:
55
- /articles/about-continuous-integration
@@ -10,6 +10,7 @@ redirect_from:
1010
- /actions/automating-builds-and-tests/about-continuous-integration
1111
- /actions/about-github-actions/about-continuous-integration
1212
- /actions/about-github-actions/about-continuous-integration-with-github-actions
13+
- /actions/concepts/overview/about-continuous-integration-with-github-actions
1314
versions:
1415
fpt: '*'
1516
ghes: '*'
@@ -44,13 +45,6 @@ In addition to helping you set up CI workflows for your project, you can use {%
4445

4546
For a definition of common terms, see [AUTOTITLE](/actions/learn-github-actions/understanding-github-actions).
4647

47-
## Workflow templates
48+
## Next steps
4849

49-
{% data variables.product.github %} offers CI workflow templates for a variety of languages and frameworks.
50-
51-
Browse the complete list of CI workflow templates offered by {% data variables.product.company_short %} in the {% ifversion fpt or ghec %}[actions/starter-workflows](https://github.com/actions/starter-workflows/tree/main/ci) repository{% else %} `actions/starter-workflows` repository on {% data variables.product.prodname_dotcom_the_website %}{% endif %}.
52-
53-
## Further reading
54-
55-
* [AUTOTITLE](/actions/use-cases-and-examples/building-and-testing){% ifversion fpt or ghec %}
56-
* [AUTOTITLE](/billing/managing-billing-for-github-actions){% endif %}
50+
{% data variables.product.github %} offers CI workflow templates for a variety of languages and frameworks. For tutorials on setting up continuous integration with these templates, see [AUTOTITLE](/actions/use-cases-and-examples/building-and-testing).

content/actions/concepts/overview/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ versions:
88
ghec: '*'
99
children:
1010
- /about-continuous-deployment-with-github-actions
11-
- /about-continuous-integration-with-github-actions
11+
- /continuous-integration
1212
- /usage-limits-billing-and-administration
1313
---

content/actions/index.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ featuredLinks:
99
startHere:
1010
- /actions/how-tos/writing-workflows
1111
- /actions/how-tos/use-cases-and-examples
12-
- /actions/concepts/overview/about-continuous-integration-with-github-actions
12+
- /actions/concepts/overview/continuous-integration
1313
- /actions/concepts/use-cases/deploying-with-github-actions
1414
- /actions/concepts/use-cases/about-packaging-with-github-actions
1515
- /actions/how-tos/monitoring-and-troubleshooting-workflows
@@ -42,4 +42,3 @@ children:
4242
- /reference
4343
- /tutorials
4444
---
45-
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
1. Type a name for your repository, and an optional description.
1+
1. Type a name for your repository (maximum 100 characters), and an optional description.
22

33
![Screenshot of a the first step in creating a repository. The "Repository name" field contains the text "hello-world" and is outlined in orange.](/assets/images/help/repository/create-repository-name.png)

next.config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ import fs from 'fs'
22
import path from 'path'
33

44
import frontmatter from 'gray-matter'
5-
import { ROOT } from '#src/frame/lib/constants.js'
5+
// Replace imports with hardcoded values
6+
const ROOT = process.env.ROOT || '.'
67

78
// Hard-coded language keys to avoid TypeScript import in config file
89
const languageKeys = ['en', 'es', 'ja', 'pt', 'zh', 'ru', 'fr', 'ko', 'de']

src/archives/lib/is-archived-version.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import patterns from '@/frame/lib/patterns.js'
2-
import { deprecated } from '@/versions/lib/enterprise-server-releases.js'
1+
import patterns from '@/frame/lib/patterns'
2+
import { deprecated } from '@/versions/lib/enterprise-server-releases'
33
import type { ExtendedRequest } from '@/types'
44

55
type IsArchivedInfo = {

src/archives/lib/old-versions-utils.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import path from 'path'
2-
import { supported, latest } from '@/versions/lib/enterprise-server-releases.js'
3-
import patterns from '@/frame/lib/patterns.js'
4-
import nonEnterpriseDefaultVersion from '@/versions/lib/non-enterprise-default-version.js'
2+
import { supported, latest } from '@/versions/lib/enterprise-server-releases'
3+
import patterns from '@/frame/lib/patterns'
4+
import nonEnterpriseDefaultVersion from '@/versions/lib/non-enterprise-default-version'
55
import { allVersions } from '@/versions/lib/all-versions'
66
const latestNewVersion = `enterprise-server@${latest}`
77
const oldVersions = ['dotcom'].concat(supported)

src/archives/middleware/archived-enterprise-versions-assets.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
import got from 'got'
22
import type { Response, NextFunction } from 'express'
33

4-
import patterns from '@/frame/lib/patterns.js'
4+
import patterns from '@/frame/lib/patterns'
55
import { isArchivedVersion } from '@/archives/lib/is-archived-version'
6-
import {
7-
setFastlySurrogateKey,
8-
SURROGATE_ENUMS,
9-
} from '@/frame/middleware/set-fastly-surrogate-key.js'
10-
import { archivedCacheControl, defaultCacheControl } from '@/frame/middleware/cache-control.js'
6+
import { setFastlySurrogateKey, SURROGATE_ENUMS } from '@/frame/middleware/set-fastly-surrogate-key'
7+
import { archivedCacheControl, defaultCacheControl } from '@/frame/middleware/cache-control'
118
import type { ExtendedRequest } from '@/types'
129

1310
// This module handles requests for the CSS and JS assets for

0 commit comments

Comments
 (0)