Skip to content

Commit

Permalink
Merge pull request #36420 from github/repo-sync
Browse files Browse the repository at this point in the history
Repo sync
  • Loading branch information
docs-bot authored Feb 21, 2025
2 parents 5facf01 + 00db977 commit 13aec25
Show file tree
Hide file tree
Showing 23 changed files with 28 additions and 39 deletions.
2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ contributing/
docs/
node_modules/
tests/
# Folder is cloned during the preview + prod workflows, the assets are merged into other locations for use before the build
# Folder is cloned during the Dockerfile build
docs-early-access/
README.md
4 changes: 2 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ If there's _not_ an existing issue, please open one first to make it more likely
### What's being changed (if available, include any code snippets, screenshots, or gifs):

<!-- Let us know what you are changing. Share anything that could provide the most context.
If you made changes to the `content` directory, a table will populate in a comment below with links to the preview and current production articles. -->
If you made changes to the `content` directory, a table will populate in a comment below with links to the review and current production articles. -->

### Check off the following:

- [ ] A subject matter expert (SME) has reviewed the technical accuracy of the content in this PR. In most cases, the author can be the SME. Open source contributions may require an SME review from GitHub staff.
- [ ] The changes in this PR meet [the docs fundamentals that are required for all content](http://docs.github.com/en/contributing/writing-for-github-docs/about-githubs-documentation-fundamentals).
- [ ] All CI checks are passing and the changes look good in the preview environment.
- [ ] All CI checks are passing and the changes look good in the review environment.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ npm ci
npm start
```

You should now have a running server. To access your local preview environment, visit [localhost:4000](http://localhost:4000) in your browser.
You should now have a running server. To access your local environment, visit [localhost:4000](http://localhost:4000) in your browser.

When you're ready to stop your local server, type <kbd>Ctrl</kbd>+<kbd>C</kbd> in your terminal window.

Expand Down
2 changes: 1 addition & 1 deletion contributing/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Power users may want to read more about [debugging the docs application](./debug

As an alternative, you can simply use [GitHub Codespaces](https://docs.github.com/en/codespaces/overview). For more information about using a codespace for working on GitHub documentation, see [Working in a codespace](https://github.com/github/docs/blob/main/contributing/codespace.md).

In a matter of minutes, you will be ready to edit, preview and test your changes directly from the comfort of your browser.
In a matter of minutes, you will be ready to edit, review and test your changes directly from the comfort of your browser.

### Using browser shortcuts

Expand Down
1 change: 0 additions & 1 deletion data/reusables/contributing/content-linter-rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
| [search-replace](https://github.com/OnkarRuikar/markdownlint-rule-search-replace) | todocs-placeholder | Catch occurrences of TODOCS placeholder. | error | |
| [search-replace](https://github.com/OnkarRuikar/markdownlint-rule-search-replace) | docs-domain | Catch occurrences of docs.github.com domain. | error | |
| [search-replace](https://github.com/OnkarRuikar/markdownlint-rule-search-replace) | help-domain | Catch occurrences of help.github.com domain. | error | |
| [search-replace](https://github.com/OnkarRuikar/markdownlint-rule-search-replace) | preview-domain | Catch occurrences of preview.ghdocs.com domain. | error | |
| [search-replace](https://github.com/OnkarRuikar/markdownlint-rule-search-replace) | developer-domain | Catch occurrences of developer.github.com domain. | error | |
| [search-replace](https://github.com/OnkarRuikar/markdownlint-rule-search-replace) | deprecated liquid syntax: site.data | Catch occurrences of deprecated liquid data syntax. | error | |
| [search-replace](https://github.com/OnkarRuikar/markdownlint-rule-search-replace) | deprecated liquid syntax: octicon-<icon-name> | The octicon liquid syntax used is deprecated. Use this format instead `octicon "<octicon-name>" aria-label="<Octicon aria label>"` | error | |
Expand Down
2 changes: 1 addition & 1 deletion src/assets/middleware/dynamic-assets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export default async function dynamicAssets(
// likely never be enjoyed by network or human eyes.
effort = 1
} else if (process.env.NODE_ENV === 'development') {
// If you're doing local development (or preview!), the
// If you're doing local development (or review), the
// network is not precious (localhost:4000) and you have no
// CDN to cache it for you. Make it low but not too unrealistically
// low.
Expand Down
2 changes: 1 addition & 1 deletion src/assets/scripts/validate-asset-images.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//
// Generally writers don't check in bogus/corrupt images but mistakes
// can happen and it's ideally spotted in other processes such as
// reviewing PR preview environment.
// reviewing PR review environment.
// This script also makes sure that all images really are what they're
// called. For example, an image might be named `screenshot.png` but
// it might actually be something mischievous.
Expand Down
8 changes: 4 additions & 4 deletions src/bookmarklets/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Bookmarklets

The [bookmarklets](https://en.wikipedia.org/wiki/Bookmarklet) in this directory are browser shortcuts that may help with reviewing GitHub documentation. We may eventually build the functionality they provide into Docs preview environments, but these are handy hacks for now.
The [bookmarklets](https://en.wikipedia.org/wiki/Bookmarklet) in this directory are browser shortcuts that may help with reviewing GitHub documentation. We may eventually build the functionality they provide into Docs review environments, but these are handy hacks for now.

## Installing bookmarklets

Expand All @@ -17,19 +17,19 @@ Clicking the bookmark will then execute the JavaScript.

[`src/bookmarklets/view-in-development.js`](./view-in-development.js)

When you're looking at a page on docs.github.com or a preview server at preview.ghdocs.com, clicking this bookmarklet will load the same path you're viewing but on your local server running at localhost:4000.
When you're looking at a page on docs.github.com or a review server, clicking this bookmarklet will load the same path you're viewing but on your local server running at localhost:4000.

## "View in production" toggle

[`src/bookmarklets/view-in-production.js`](./view-in-production.js)

When you're looking at a page on a preview server at preview.ghdocs.com or your local server running at localhost:4000, clicking this bookmarklet will load the same path you're viewing but on the live documentation site at docs.github.com.
When you're looking at a page on a review server or your local server running at localhost:4000, clicking this bookmarklet will load the same path you're viewing but on the live documentation site at docs.github.com.

## Open a docs article in VS Code

[`src/bookmarklets/open-in-vscode.js`](./open-in-vscode.js)

When you're looking at a page on either docs.github.com, preview.ghdocs.com, or localhost:4000, clicking this bookmarklet will open the source Markdown file from your local checkout in VS Code.
When you're looking at a page on either docs.github.com, review, or localhost:4000, clicking this bookmarklet will open the source Markdown file from your local checkout in VS Code.

The installation requires a few steps:

Expand Down
9 changes: 0 additions & 9 deletions src/content-linter/style/github-docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -266,15 +266,6 @@ export const searchReplaceConfig = {
'partial-markdown-files': true,
'yml-files': true,
},
{
name: 'preview-domain',
message: 'Catch occurrences of preview.ghdocs.com domain.',
search: 'preview.ghdocs.com',
searchScope: 'all',
severity: 'error',
'partial-markdown-files': true,
'yml-files': true,
},
{
name: 'developer-domain',
message: 'Catch occurrences of developer.github.com domain.',
Expand Down
3 changes: 1 addition & 2 deletions src/content-linter/tests/unit/search-replace.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ describe(searchReplace.names.join(' - '), () => {
'docs.github.com',
'- help.github.com',
'[help.github.com](//developer.github.com)',
'![developer.github.com](//preview.ghdocs.com)',
' docs.github.com',
'developer.github.com/enterprise',
'developer.github.com/enterprise/',
Expand All @@ -44,7 +43,7 @@ describe(searchReplace.names.join(' - '), () => {
ruleConfig: searchReplaceConfig['search-replace'],
})
const errors = result.markdown
expect(errors.length).toBe(10)
expect(errors.length).toBe(8)
})

test('Deprecated Liquid syntax causes error', async () => {
Expand Down
2 changes: 1 addition & 1 deletion src/content-render/unified/rewrite-local-links.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ export default function rewriteLocalLinks(context) {
})

if (!isProd) {
// This runs when doing local preview, link checker tests, or
// This runs when doing local review, link checker tests, or
// running a script like `update-internal-links.js`.
visit(tree, matcherAnchorLinks, (node) => {
for (const child of node.children || []) {
Expand Down
4 changes: 2 additions & 2 deletions src/deployments/staging/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
> [!NOTE]
> For internal documentation, please see the `Moda` directory in the internal Docs Engineering repo.
When you make a code change and want to preview it in a live environment, you can use a staging server. If your change only touches content files e.g. `content/` and `data/` directories, please use the [review server](../../review-server/README.md) instead.
When you make a code change and want to review it in a live environment, you can use a staging server. If your change only touches content files e.g. `content/` and `data/` directories, please use the [review server](../../review-server/README.md) instead.

To preview code changes on a staging server:
To review code changes on a staging server:

1. If your changes aren't already in remote, push your branch to `docs-internal` .
2. Open a draft PR with your changes.
Expand Down
2 changes: 1 addition & 1 deletion src/events/components/experiments/experiment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ export function initializeExperiments(
experiment.percentOfUsersToGetExperiment,
)

// Even in preview & prod it is useful to see if a given experiment is "on" or "off"
// In any environment, it is useful to see if a given experiment is "on" or "off"
console.log(
`Experiment ${experiment.key} is in the "${controlGroup === TREATMENT_VARIATION ? TREATMENT_VARIATION : CONTROL_VARIATION}" group for this browser.\nCall function window.overrideControlGroup('${experiment.key}', 'treatment' | 'control') to change your group for this session.`,
)
Expand Down
2 changes: 1 addition & 1 deletion src/fixtures/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Deeper than the product level, the names and directories can be whatever
you want it to be.

Once you've found a place to put some fixture content, before writing
a `vitest` test, you can preview your changes using:
a `vitest` test, you can review your changes using:

```shell
npm run fixture-dev
Expand Down
2 changes: 1 addition & 1 deletion src/frame/lib/create-tree.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default async function createTree(originalPath, rootPath, previousTree) {
filepath = `${originalPath}/index.md`
// Note, if this throws, that's quite fine. It usually means that
// there's a `index.md` whose `children:` entry lists something that
// doesn't exist on disk. So the writer who tries to preview the
// doesn't exist on disk. So the writer who tries to review the
// page will see the error and it's hopefully clear what's actually
// wrong.
try {
Expand Down
2 changes: 1 addition & 1 deletion src/frame/lib/get-remote-json.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export default async function getRemoteJSON(url, config) {
}
cache.set(cacheKey, JSON.parse(res.body))

// Only write to disk for testing and local preview.
// Only write to disk for testing and local review.
// In production, we never write to disk. Only in-memory.
if (!inProd) {
fs.mkdirSync(path.dirname(onDisk), { recursive: true })
Expand Down
2 changes: 1 addition & 1 deletion src/frame/middleware/reload-tree.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* This exists for local previewing. Only.
* This exists for local reviewing. Only.
* We load in the entire tree on startup, then that's used for things like
* sidebars and breadcrumbs and landing pages and ToC pages (and possibly
* more).
Expand Down
2 changes: 1 addition & 1 deletion src/pageinfo/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ async function getPageInfoFromCache(page: Page, pathname: string) {
// a HTTP GET request will only happen once per deployment. That's
// because the CDN will cache it until the next deployment (which is
// followed by a CDN purge).
// In development (local preview), the performance doesn't really matter.
// In development (local review), the performance doesn't really matter.
// In CI, we use the caching because the CI runs
// `npm run precompute-pageinfo` right before it runs vitest tests.
}
Expand Down
4 changes: 2 additions & 2 deletions src/rest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Our REST pipeline creates autogenerated REST API documentation for docs.github.com/rest from the OpenAPI stored in the open-source repository [`github/rest-api-description`](https://github.com/github/rest-api-description).

The pipeline is used to generate data that is used by the docs.github.com site when deployed locally, in preview environments, or in production.
The pipeline is used to generate data that is used by the docs.github.com site when deployed locally, in review environments, or in production.

## How does it work

Expand Down Expand Up @@ -77,4 +77,4 @@ Writers can also add an introduction paragraph _above_ the following Markdown co
Slack: `#docs-engineering`
Repo: `github/docs-engineering`

If you have a question about the REST pipeline, you can ask in the `#docs-engineering` Slack channel. If you notice a problem with the REST pipeline, you can open an issue in the `github/docs-engineering` repository.
If you have a question about the REST pipeline, you can ask in the `#docs-engineering` Slack channel. If you notice a problem with the REST pipeline, you can open an issue in the `github/docs-engineering` repository.
2 changes: 1 addition & 1 deletion src/rest/docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const log = console.log

log(
chalk.green.bold(
'\nUse this script to build a local docs preview. You can build specific versions of the REST and Webhook docs.\n',
'\nUse this script to build a local docs review. You can build specific versions of the REST and Webhook docs.\n',
),
)
log(chalk.white.bold(' Versions that can be built: ', openApiVersions, '\n'))
Expand Down
2 changes: 1 addition & 1 deletion src/search/middleware/search-routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ router.get(
searchCacheControl(res)
// We can cache this without purging it after every deploy
// because the API search is only used as a proxy for local
// and preview environments.
// and review environments.
setFastlySurrogateKey(res, SURROGATE_ENUMS.MANUAL)
}

Expand Down
2 changes: 1 addition & 1 deletion src/shielding/middleware/rate-limit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export function createRateLimiter(max = MAX) {

keyGenerator: (req) => {
let { ip } = req
// In our preview environments, with the way the proxying works,
// In our review environments, with the way the proxying works,
// the `x-forwarded-for` is always the origin IP with a port number
// attached. E.g. `75.40.90.27:56675, 169.254.129.1`
// This port number portion changes with every request, so we strip it.
Expand Down
4 changes: 2 additions & 2 deletions src/webhooks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Our webhooks pipeline creates autogenerated webhooks documentation for docs.github.com/webhooks-and-events/webhooks/webhook-events-and-payloads from the OpenAPI stored in the open-source repository [`github/rest-api-description`](https://github.com/github/rest-api-description).

The pipeline is used to generate data that is used by the docs.github.com site when deployed locally, in preview environments, or in production.
The pipeline is used to generate data that is used by the docs.github.com site when deployed locally, in review environments, or in production.

## How does it work

Expand Down Expand Up @@ -56,4 +56,4 @@ The content writers can manually update frontmatter and introductory content in
Slack: `#docs-engineering`
Repo: `github/docs-engineering`

If you have a question about the webhooks pipeline, you can ask in the `#docs-engineering` Slack channel. If you notice a problem with the webhooks pipeline, you can open an issue in the `github/docs-engineering` repository.
If you have a question about the webhooks pipeline, you can ask in the `#docs-engineering` Slack channel. If you notice a problem with the webhooks pipeline, you can open an issue in the `github/docs-engineering` repository.

0 comments on commit 13aec25

Please sign in to comment.