Skip to content

Commit 344ea15

Browse files
authored
Merge branch 'main' into fix-typos-in-creating-redis-service-containers-docs
2 parents b820e05 + 240c0a0 commit 344ea15

File tree

1,190 files changed

+36966
-29263
lines changed

Some content is hidden

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

1,190 files changed

+36966
-29263
lines changed

.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[]
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: 'Retry command'
2+
description: 'Retries any command with configurable attempts and delay'
3+
inputs:
4+
command:
5+
description: 'The command to retry'
6+
required: true
7+
max_attempts:
8+
description: 'Maximum number of retry attempts'
9+
required: false
10+
default: '8'
11+
delay:
12+
description: 'Delay between attempts in seconds'
13+
required: false
14+
default: '15'
15+
16+
runs:
17+
using: 'composite'
18+
steps:
19+
- name: Retry command
20+
shell: bash
21+
run: |
22+
# Generic retry function: configurable attempts and delay
23+
retry_command() {
24+
local max_attempts=${{ inputs.max_attempts }}
25+
local delay=${{ inputs.delay }}
26+
local attempt=1
27+
local command="${{ inputs.command }}"
28+
29+
while [ $attempt -le $max_attempts ]; do
30+
echo "Attempt $attempt/$max_attempts: Running command..."
31+
echo "Command: $command"
32+
if eval "$command"; then
33+
echo "Command succeeded on attempt $attempt"
34+
return 0
35+
else
36+
echo "Attempt $attempt failed"
37+
if [ $attempt -lt $max_attempts ]; then
38+
echo "Waiting $delay seconds before retry..."
39+
sleep $delay
40+
fi
41+
fi
42+
attempt=$((attempt + 1))
43+
done
44+
45+
echo "Command failed after $max_attempts attempts"
46+
return 1
47+
}
48+
49+
retry_command

.github/copilot-instructions.md

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
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+
### Parenthetical dashes
62+
63+
Where a sentence of normal body text contains a parenthetical dash, the dash should always be an em dash without spaces at either side. This rule does not apply to text within code blocks.
64+
65+
Examples:
66+
67+
* ✅ Correct: "The cat—which sat on a branch—smiled with a broad grin." (em dash without spaces)
68+
* ❌ Incorrect: "The cat — which sat on a branch — smiled with a broad grin." (em dash with spaces)
69+
* ❌ Incorrect: "The cat–which sat on a branch–smiled with a broad grin." (en dash without spaces)
70+
* ❌ Incorrect: "The cat – which sat on a branch – smiled with a broad grin." (en dash with spaces)
71+
* ❌ Incorrect: "The cat-which sat on a branch-smiled with a broad grin." (hyphen without spaces)
72+
* ❌ Incorrect: "The cat - which sat on a branch - smiled with a broad grin." (hyphen with spaces)
73+
74+
## Creating a pull request
75+
76+
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):
77+
78+
`_This pull request was created as a result of the following prompt in Copilot Chat._`
79+
80+
Then, within a collapsed section, quote the original prompt from Copilot Chat:
81+
82+
```markdown
83+
<details>
84+
<summary>Original prompt - submitted by @GITHUB-USER-ID</summary>
85+
86+
> [Original prompt text here]
87+
88+
</details>
89+
```
90+
91+
This helps reviewers understand the context and intent behind the automated changes.
92+
93+
## Development and testing guidelines
94+
95+
### Content changes
96+
97+
Before committing content changes, always:
98+
99+
1. **Use the content linter** to validate content: `npm run lint-content -- --paths <file-paths>`
100+
2. **Check for proper variable usage** in your content
101+
3. **Verify [AUTOTITLE] links** point to existing articles
102+
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

.github/workflows/all-documents.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
runs-on: ubuntu-latest
2121
steps:
2222
- name: Check out repo
23-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
23+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2424

2525
- uses: ./.github/actions/node-npm-setup
2626

.github/workflows/article-api-docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
if: github.repository == 'github/docs-internal' || github.repository == 'github/docs'
2323
steps:
2424
- name: Checkout
25-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
25+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2626

2727
- uses: ./.github/actions/node-npm-setup
2828

.github/workflows/check-broken-links-github-github.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ jobs:
2020
# need to use a token from a user with access to github/github for this step
2121
GITHUB_TOKEN: ${{ secrets.DOCS_BOT_PAT_BASE }}
2222
REPORT_AUTHOR: docs-bot
23-
REPORT_LABEL: github github broken link report
23+
REPORT_LABEL: github github broken link report,workflow-generated
2424
REPORT_REPOSITORY: github/docs-content
2525
steps:
2626
- name: Checkout
27-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
27+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2828
with:
2929
# To prevent issues with cloning early access content later
3030
persist-credentials: 'false'

.github/workflows/close-on-invalid-label.yaml

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

3838
- name: Check out repo
3939
if: ${{ failure() && github.event_name != 'pull_request_target' }}
40-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
40+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
4141

4242
- uses: ./.github/actions/slack-alert
4343
if: ${{ failure() && github.event_name != 'pull_request_target' }}

.github/workflows/codeql.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
if: github.repository == 'github/docs-internal' || github.repository == 'github/docs'
3636
runs-on: ubuntu-latest
3737
steps:
38-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
38+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3939
- uses: github/codeql-action/init@eb055d739abdc2e8de2e5f4ba1a8b246daa779aa # v3.26.0
4040
with:
4141
languages: javascript # comma separated list of values from {go, python, javascript, java, cpp, csharp, ruby}

.github/workflows/confirm-internal-staff-work-in-docs.yml

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

8484
- name: Check out repo
8585
if: ${{ failure() && github.event_name != 'pull_request_target' }}
86-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
86+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
8787
- uses: ./.github/actions/slack-alert
8888
if: ${{ failure() && github.event_name != 'pull_request_target' }}
8989
with:

.github/workflows/content-lint-markdown.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
runs-on: ${{ fromJSON('["ubuntu-latest", "ubuntu-20.04-xl"]')[github.repository == 'github/docs-internal'] }}
2424
steps:
2525
- name: Check out repo
26-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
26+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2727

2828
- name: Set up Node and dependencies
2929
uses: ./.github/actions/node-npm-setup

0 commit comments

Comments
 (0)