Skip to content

Commit d79d0fb

Browse files
Merge branch 'main' into patch-1
2 parents 43a37b0 + 5adc086 commit d79d0fb

589 files changed

Lines changed: 16253 additions & 11281 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/CODEOWNERS

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,5 @@
66
# Site Policy
77
content/site-policy/ @github/site-policy-admins
88

9-
# Enterprise
10-
data/release-notes/**/*.yml @github/docs-content-enterprise
11-
src/ghes-releases/lib/enterprise-dates.json @github/docs-content-enterprise
12-
139
# Requires review of #actions-oidc-integration, docs-engineering/issues/1506
1410
# content/actions/deployment/security-hardening-your-deployments/** @github/oidc

.github/actions/create-workflow-failure-issue/action.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,5 +89,6 @@ runs:
8989
gh issue create \
9090
--repo "$ISSUE_REPO" \
9191
--label "workflow-failure" \
92+
--label "workflow-generated" \
9293
--title "[Workflow Failure] $WORKFLOW_NAME" \
9394
--body "$body"

.github/dependabot.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ updates:
1818
ignore:
1919
# Because this is so dependent on the remote server we use
2020
- dependency-name: '@elastic/elasticsearch'
21-
# Because whatever we have needs to match what @primer/react also uses
22-
- dependency-name: 'styled-components'
2321
- dependency-name: '*'
2422
update-types:
2523
['version-update:semver-patch', 'version-update:semver-minor']

.github/instructions/code.instructions.md

Lines changed: 5 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@ applyTo: "src/**,.github/**,config/**,.devcontainer/**,**Dockerfile,package*.jso
44

55
# Copilot code instructions for docs.github.com
66

7-
For code reviews, follow guidelines, tests, and validate instructions. For creating or updating pull requests or branches, follow the steps instructions.
7+
For code reviews and for creating or updating pull requests, follow the Guidelines, Tests, and Validate sections below.
88

99
## Guidelines
1010

11+
- Before you make a new branch, make sure you have the latest changes by running `git checkout main && git pull`.
1112
- If available, use ripgrep (`rg`) instead of `grep`.
1213
- When using gh cli in double-quoted strings, escape backticks to prevent bash command substitution. In single-quoted strings, backticks do not need escaping.
1314
- All scripts should be listed in `package.json` and use `tsx`.
@@ -17,6 +18,9 @@ For code reviews, follow guidelines, tests, and validate instructions. For creat
1718
- 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'`
1819
- For updates to the content linter, read important information in `src/content-linter/README.md`.
1920
- Do not use git force push, and avoid git rebase.
21+
- When reading issues and pull requests, read all comments as well.
22+
- When you are updating an existing pull request, after you commit and push, _concisely_ comment on the pull request that you are GitHub Copilot and what changes you made and why.
23+
- When running in agentic mode, offer the human the option to wait for and review CI checks and automatic Copilot code review comments.
2024

2125
## Tests
2226

@@ -79,30 +83,6 @@ Run the following commands to validate your changes:
7983
- `npm run prettier`
8084
- `npm run lint`: you can include `-- --fix`
8185

82-
## Steps
83-
84-
0. Ask the human if they would like you to follow these steps.
85-
1. If this is new work, make sure you have the latest changes by running `git checkout main && git pull`. If this is existing work, update the branch you are working on with the head branch -- usually `main`.
86-
2. If the human provides a GitHub issue, use MCP or gh cli to read the issue and all comments.
87-
3. Begin by evaluating impact, effort, and estimate non-test lines of code that will change. Ask for more context and examples if needed.
88-
4. If you are running in agentic mode, _stop_ at this point and request approval from the human.
89-
5. If you need to add or change tests, work on tests before implementing.
90-
6. Implement the changes needed. If you are running in agentic mode, _stop_ and ask questions at decision points. Please list the options, pros and cons for each decision needed.
91-
7. Validate your changes before making any commits. See "Validate".
92-
8. Validate that any new or changed tests pass. See "Tests".
93-
9. Validate that these changes meet our guidelines. See "Guidelines".
94-
10. If you are running in agentic mode, _stop_ at this point and request review before continuing. Suggest how the human should review the changes.
95-
11. If a branch and pull request already exist, commit and push, then _concisely_ comment on the pull request that you are GitHub Copilot and what changes you made and why.
96-
12. If this is new work and no pull request exists yet, make a pull request:
97-
- label "llm-generated"
98-
- draft mode
99-
- include "fixes owner/repo#issue" or "towards owner/repo#issue" as appropriate
100-
13. If you are in agentic mode, offer to wait for CI to run and check that it passes. If the human agrees, verify in CI: `sleep 240 && gh pr checks $number`. Address all failures, don't assume they're flakes.
101-
14. If you are in agentic mode, offer to do any or all of:
102-
- mark the pull request as ready,
103-
- assign the issue to the human if it is not already assigned,
104-
- _concisely_ comment on the issue explaining the change, indicating you are GitHub Copilot.
105-
10686
## Logger
10787

10888
Use `createLogger` from `@/observability/logger` instead of `console.log` in server-side code.

.github/instructions/content.instructions.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,3 +92,47 @@ Examples:
9292
* ❌ Incorrect: "The cat – which sat on a branch – smiled with a broad grin." (en dash with spaces)
9393
* ❌ Incorrect: "The cat-which sat on a branch-smiled with a broad grin." (hyphen without spaces)
9494
* ❌ Incorrect: "The cat - which sat on a branch - smiled with a broad grin." (hyphen with spaces)
95+
96+
## Versioning
97+
98+
Follow one of these sets of instructions, depending on how articles are versioned in the frontmatter. Articles may be versioned for FPT and GHEC, for GHES only, or for all three. Articles may also be versioned using feature-based versioning defined in `data/features`. Feature-based versioning allows centralized control of when content appears for specific GHES releases.
99+
100+
### FPT/GHEC-only articles
101+
102+
All articles that are ONLY for FPT and GHEC should be versioned for these versions in the frontmatter.
103+
104+
For such content, DO NOT use in-article Liquid versioning such as `{% ifversion fpt %}`, `{% ifversion ghec %}`, and `{% ifversion fpt or ghec %}`.
105+
106+
### GHES-only articles
107+
108+
All articles that are ONLY for GitHub Enterprise Server (GHES) should be versioned in the frontmatter using feature-based versioning defined in `data/features/`.
109+
110+
### FPT, GHEC, GHES articles
111+
112+
All articles that are versioned for all of FPT, GHEC, and GHES in the frontmatter MAY require certain blocks of content to be versioned using in-article Liquid versioning. Before recommending this, check if this is really the case.
113+
114+
#### Check in-article versioning is required
115+
116+
Before resorting to in-article versioning, first consider whether the content is actually different across versions. Often procedures can be simplified to work at both levels.
117+
118+
Use these strategies instead of `{% ifversion %}`, depending on the level of content:
119+
120+
**At the article level:**
121+
122+
* When the feature is only available in certain products, use the "Who can use this feature?" box to convey that the content of the article applies only to specific products
123+
* When an article only exists because the functionality is only available in older GHES releases (and not on {% data variables.product.prodname_dotcom_the_website %} or newer GHES releases), just remove that article
124+
125+
**At the heading level:**
126+
127+
* Use prose similar to "Who can use this feature?" to convey that the content of a section applies only to specific products
128+
129+
**At the paragraph or sentence level:**
130+
131+
* If you're briefly introducing a feature and then linking to an article, there's no need to specify versioning. Let readers learn availability when they follow the link, via the "Who can use this feature?" box
132+
* When necessary, start sentences with "With {% data variables.product.prodname_ghe_cloud %}...", "On {% data variables.product.prodname_dotcom_the_website %}...", etc.
133+
* End list items with "({% data variables.product.prodname_ghe_cloud %} only)", "({% data variables.product.prodname_dotcom_the_website %} only)", etc.
134+
* Specify if the feature is not available for GHES with "NAME-OF-FEATURE is not available for {% data variables.product.prodname_ghe_server %}", "... (not available in {% data variables.product.prodname_ghe_server %})", etc.
135+
136+
#### If in-article versioning is required
137+
138+
In-article versioning is required if a block of content in an article is definitely ONLY relevant for GHES, but the article itself is otherwise versioned in the frontmatter for all of FPT, GHEC, and GHES. In this situation, use feature-based versioning (FBV) wherever possible, using `{% ifversion FBV %}` blocks, where FBV is defined in `data/features/`. If it's not possible to use FBV, use {% ifversion ghes %} blocks, which will version the content block for all versions of GHES.

.github/workflows/changelog-agent.yml

Lines changed: 33 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,20 @@ jobs:
4545
)
4646
runs-on: ubuntu-latest
4747
steps:
48+
- name: Generate GitHub App token
49+
id: app-token
50+
uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
51+
with:
52+
app-id: ${{ secrets.DOCS_BOT_APP_ID }}
53+
private-key: ${{ secrets.DOCS_BOT_APP_PRIVATE_KEY }}
54+
owner: github
55+
repositories: docs-internal,docs-content
56+
4857
- name: Resolve PR data
4958
id: resolve_pr
5059
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
5160
with:
52-
github-token: ${{ secrets.DOCS_BOT_PAT_BASE }}
61+
github-token: ${{ steps.app-token.outputs.token }}
5362
script: |
5463
let pr;
5564
if (context.eventName === 'workflow_dispatch') {
@@ -77,7 +86,7 @@ jobs:
7786
id: check_team
7887
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
7988
with:
80-
github-token: ${{ secrets.DOCS_BOT_PAT_BASE }}
89+
github-token: ${{ steps.app-token.outputs.token }}
8190
script: |
8291
const author = '${{ steps.resolve_pr.outputs.pr_author }}';
8392
@@ -115,7 +124,7 @@ jobs:
115124
env:
116125
PR_BODY: ${{ steps.resolve_pr.outputs.pr_body }}
117126
with:
118-
github-token: ${{ secrets.DOCS_BOT_PAT_BASE }}
127+
github-token: ${{ steps.app-token.outputs.token }}
119128
script: |
120129
const body = process.env.PR_BODY || '';
121130
@@ -150,7 +159,7 @@ jobs:
150159
id: check_parent
151160
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
152161
with:
153-
github-token: ${{ secrets.DOCS_BOT_PAT_BASE }}
162+
github-token: ${{ steps.app-token.outputs.token }}
154163
script: |
155164
const issueNumber = parseInt('${{ steps.extract_issue.outputs.issue_number }}', 10);
156165
@@ -231,7 +240,7 @@ jobs:
231240
PR_BODY: ${{ steps.resolve_pr.outputs.pr_body }}
232241
PR_URL: ${{ steps.resolve_pr.outputs.pr_url }}
233242
with:
234-
github-token: ${{ secrets.DOCS_BOT_PAT_BASE }}
243+
github-token: ${{ steps.app-token.outputs.token }}
235244
script: |
236245
const prNumber = parseInt('${{ steps.resolve_pr.outputs.pr_number }}', 10);
237246
const prAuthor = '${{ steps.resolve_pr.outputs.pr_author }}';
@@ -272,7 +281,7 @@ jobs:
272281
id: check_existing
273282
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
274283
with:
275-
github-token: ${{ secrets.DOCS_BOT_PAT_BASE }}
284+
github-token: ${{ steps.app-token.outputs.token }}
276285
script: |
277286
const branchName = `changelog-agent-${{ steps.resolve_pr.outputs.pr_number }}`;
278287
const { data: pulls } = await github.rest.pulls.list({
@@ -295,7 +304,7 @@ jobs:
295304
id: read_examples
296305
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
297306
with:
298-
github-token: ${{ secrets.DOCS_BOT_PAT_BASE }}
307+
github-token: ${{ steps.app-token.outputs.token }}
299308
script: |
300309
// Fetch changelog-internal.md from docs-content
301310
const { data } = await github.rest.repos.getContent({
@@ -404,13 +413,26 @@ jobs:
404413
fs.writeFileSync('prompt.txt', userPrompt);
405414
core.setOutput('date_str', dateStr);
406415
416+
- name: Set up Node.js for Copilot CLI
417+
if: steps.check_parent.outputs.has_parent == 'true' && steps.check_existing.outputs.exists == 'false'
418+
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
419+
with:
420+
node-version: 24
421+
422+
- name: Install GitHub Copilot CLI
423+
if: steps.check_parent.outputs.has_parent == 'true' && steps.check_existing.outputs.exists == 'false'
424+
run: npm install -g @github/copilot
425+
407426
- name: Generate changelog draft via Copilot
408427
if: steps.check_parent.outputs.has_parent == 'true' && steps.check_existing.outputs.exists == 'false'
409428
id: generate_draft
410429
uses: actions/ai-inference@17ff458cb182449bbb2e43701fcd98f6af8f6570 # v2.1.0
411430
with:
412431
provider: copilot
413-
model: gpt-4.1
432+
# No model is pinned: actions/ai-inference forwards --model to the
433+
# Copilot CLI only when it differs from its GitHub Models default, so
434+
# omitting it lets the CLI pick its own current default (latest Sonnet)
435+
# and avoids breaking when a pinned slug (e.g. gpt-4.1) is retired.
414436
prompt-file: prompt.txt
415437
system-prompt-file: system-prompt.txt
416438
max-completion-tokens: 1000
@@ -452,7 +474,7 @@ jobs:
452474
PARENT_AUTHOR: ${{ steps.check_parent.outputs.parent_author }}
453475
PARENT_ASSIGNEES: ${{ steps.check_parent.outputs.parent_assignees }}
454476
with:
455-
github-token: ${{ secrets.DOCS_BOT_PAT_BASE }}
477+
github-token: ${{ steps.app-token.outputs.token }}
456478
script: |
457479
const branchName = `changelog-agent-${{ steps.resolve_pr.outputs.pr_number }}`;
458480
const filePath = 'docs-content-docs/docs-content-workflows/changelog-internal.md';
@@ -613,7 +635,7 @@ jobs:
613635
PARENT_AUTHOR: ${{ steps.check_parent.outputs.parent_author }}
614636
PARENT_ASSIGNEES: ${{ steps.check_parent.outputs.parent_assignees }}
615637
with:
616-
github-token: ${{ secrets.DOCS_BOT_PAT_BASE }}
638+
github-token: ${{ steps.app-token.outputs.token }}
617639
script: |
618640
const author = process.env.PR_AUTHOR;
619641
const changelogPrUrl = process.env.CHANGELOG_PR_URL;
@@ -708,7 +730,7 @@ jobs:
708730
if: steps.create_pr.outputs.changelog_pr_url != '' && inputs.dry_run != true
709731
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
710732
with:
711-
github-token: ${{ secrets.DOCS_BOT_PAT_BASE }}
733+
github-token: ${{ steps.app-token.outputs.token }}
712734
script: |
713735
const changelogPrUrl = '${{ steps.create_pr.outputs.changelog_pr_url }}';
714736
await github.rest.issues.createComment({

.github/workflows/copy-api-issue-to-internal.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ jobs:
4545
4646
- name: Create an issue in the docs-content repo
4747
run: |
48-
new_issue_url="$(gh issue create --title "$ISSUE_TITLE" --body "$ISSUE_BODY" --repo github/docs-content --label "workflow-generated")"
48+
new_issue_url="$(gh issue create --title "$ISSUE_TITLE" --body "$ISSUE_BODY
49+
50+
Copied to this repo by the [$GITHUB_WORKFLOW workflow run]($GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID)." --repo github/docs-content --label "workflow-generated")"
4951
echo 'NEW_ISSUE='$new_issue_url >> $GITHUB_ENV
5052
env:
5153
GITHUB_TOKEN: ${{secrets.DOCS_BOT_PAT_BASE}}

.github/workflows/count-translation-corruptions.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,29 @@ jobs:
2323
if: github.repository == 'github/docs-internal'
2424
runs-on: ubuntu-latest
2525
steps:
26+
- name: Generate GitHub App token
27+
id: app-token
28+
uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
29+
with:
30+
app-id: ${{ secrets.DOCS_BOT_APP_ID }}
31+
private-key: ${{ secrets.DOCS_BOT_APP_PRIVATE_KEY }}
32+
owner: github
33+
repositories: docs-internal,docs-internal.es-es,docs-internal.ja-jp,docs-internal.pt-br,docs-internal.zh-cn,docs-internal.ru-ru,docs-internal.fr-fr,docs-internal.ko-kr,docs-internal.de-de
34+
2635
- name: Checkout English repo
2736
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
2837
with:
2938
# Using a PAT is necessary so that the new commit will trigger the
3039
# CI in the PR. (Events from GITHUB_TOKEN don't trigger new workflows.)
31-
token: ${{ secrets.DOCS_BOT_PAT_BASE }}
40+
token: ${{ steps.app-token.outputs.token }}
3241

3342
# It's important because translations are often a bit behind.
3443
# So if a translation is a bit behind, it might still be referencing
3544
# an asset even though none of the English content does.
3645
- name: Clone all translations
3746
uses: ./.github/actions/clone-translations
3847
with:
39-
token: ${{ secrets.DOCS_BOT_PAT_BASE }}
48+
token: ${{ steps.app-token.outputs.token }}
4049

4150
- uses: ./.github/actions/node-npm-setup
4251

.github/workflows/delete-orphan-translation-files.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ jobs:
127127
echo "Creating pull request..."
128128
gh pr create \
129129
--title "Delete orphan files ($current_daystamp)" \
130-
--body '👋 humans. This PR was generated from docs-internal/.github/workflows/delete-orphan-translation-files.yml.
130+
--body '👋 humans. This PR was generated by the [Delete orphan translation files](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) workflow run.
131131
' \
132132
--repo "${{ matrix.language_repo }}" \
133133
--label "workflow-generated" \

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,4 +259,6 @@ jobs:
259259
No action is required from the first responder for the Docs content team. This PR is automatically added to the Docs content review board. Any writer can review this by checking that the PR looks sensible. If CI does not pass or other problems arise, contact #docs-engineering on slack.
260260
261261
262-
When the DRI for the CodeQL CLI release is ready to publish, they will ask us to merge this PR in #docs-content.'
262+
When the DRI for the CodeQL CLI release is ready to publish, they will ask us to merge this PR in #docs-content.
263+
264+
_Generated by the [Generate code scanning query lists](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) workflow run._'

0 commit comments

Comments
 (0)