Skip to content

Commit d86e542

Browse files
authored
Merge pull request #44779 from github/repo-sync
Repo sync
2 parents fa4d1bc + a0682b4 commit d86e542

24 files changed

Lines changed: 701 additions & 92 deletions

File tree

.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/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/workflows/orphaned-files-check.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: 'Orphaned files check'
22

3-
# **What it does**: Checks that there are no files in ./assets/ and ./data/reusables that aren't mentioned in any source file.
3+
# **What it does**: Checks that there are no files in ./assets/, ./data/reusables, or ./data/tables that aren't mentioned in any source file.
44
# **Why we have it**: To avoid orphans into the repo.
55
# **Who does it impact**: Docs content.
66

@@ -16,6 +16,7 @@ on:
1616
- 'package*.json'
1717
- src/assets/scripts/find-orphaned-assets.ts
1818
- src/content-render/scripts/reusables-cli/find/unused.ts
19+
- src/data-directory/scripts/find-orphaned-tables.ts
1920
- src/workflows/walk-files.ts
2021
- src/languages/lib/languages.ts
2122
- .github/actions/clone-translations/action.yml
@@ -67,14 +68,18 @@ jobs:
6768
# information about the npm script alias.
6869
assetFilesToRemove=$(npm run -s find-orphaned-assets)
6970
reusableFilesToRemove=$(npm run -s reusables -- find unused | grep '^data/reusables' || true)
70-
[ -z "$assetFilesToRemove" ] && [ -z "$reusableFilesToRemove" ] && exit 0
71+
tableFilesToRemove=$(npm run -s find-orphaned-tables)
72+
[ -z "$assetFilesToRemove" ] && [ -z "$reusableFilesToRemove" ] && [ -z "$tableFilesToRemove" ] && exit 0
7173
7274
if [ -n "$assetFilesToRemove" ]; then
7375
echo $assetFilesToRemove | xargs git rm
7476
fi
7577
if [ -n "$reusableFilesToRemove" ]; then
7678
echo $reusableFilesToRemove | xargs git rm
7779
fi
80+
if [ -n "$tableFilesToRemove" ]; then
81+
echo $tableFilesToRemove | xargs git rm
82+
fi
7883
7984
git status
8085
@@ -100,11 +105,11 @@ jobs:
100105
git push origin $branchname
101106
102107
body=$(cat <<-EOM
103-
Found with the `npm run find-orphaned-assets` and `npm run -s reusables -- find unused` scripts.
108+
Found with the `npm run find-orphaned-assets`, `npm run -s reusables -- find unused`, and `npm run find-orphaned-tables` scripts.
104109
105110
The orphaned files workflow file .github/workflows/orphaned-files-check.yml runs every Monday at 16:20 UTC / 8:20 PST.
106111
107-
If you are the first responder, please spot check some of the unused assets to make sure they aren't referenced anywhere. Then, approve and merge the pull request.
112+
If you are the first responder, please spot check some of the unused assets, reusables, and tables to make sure they aren't referenced anywhere. Then, approve and merge the pull request.
108113
109114
For more information, see [Doc: Orphaned Assets](https://github.com/github/docs-engineering/blob/main/docs/orphaned-assets.md) and [Doc: Reusables CLI](https://github.com/github/docs-internal/tree/main/src/content-render/scripts/reusables-cli).
110115

.github/workflows/purge-fastly.yml

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,23 +38,47 @@ jobs:
3838

3939
- uses: ./.github/actions/node-npm-setup
4040

41-
- name: Wait for production to match build number
41+
- name: Wait for production to match build commit SHA
4242
if: github.event_name != 'workflow_dispatch'
43+
# A single /_build match only proves *one* Moda instance is serving the
44+
# new build; others can still be mid-rollout. If we purge then, Fastly's
45+
# soft purge serves stale-while-revalidate and may revalidate against a
46+
# lagging instance, re-caching old content as fresh for a full TTL. So we
47+
# require several consecutive matches to confirm the rollout has settled
48+
# across instances before purging.
4349
run: |
4450
needs=$(git rev-parse HEAD)
4551
start_time=$(date +%s)
4652
timeout_seconds=1200
47-
while [[ $needs != $(curl -s --fail --retry-connrefused --retry 5 https://docs.github.com/_build) ]]
53+
required_matches=5
54+
interval_seconds=10
55+
consecutive=0
56+
while [[ $consecutive -lt $required_matches ]]
4857
do
4958
if [[ $(($(date +%s) - $start_time)) -gt $timeout_seconds ]]
5059
then
51-
echo "Production did not match the build number within $timeout_seconds seconds"
60+
echo "Production did not reach $required_matches consecutive build matches within $timeout_seconds seconds"
5261
exit 1
5362
fi
54-
echo "Production is not up to date with the build commit"
55-
sleep 10
63+
if [[ $needs == $(curl -s --fail --retry-connrefused --retry 5 https://docs.github.com/_build) ]]
64+
then
65+
consecutive=$((consecutive + 1))
66+
echo "Production matches the build commit ($consecutive/$required_matches)"
67+
else
68+
if [[ $consecutive -gt 0 ]]
69+
then
70+
echo "Production stopped matching the build commit; resetting consecutive count"
71+
else
72+
echo "Production is not up to date with the build commit"
73+
fi
74+
consecutive=0
75+
fi
76+
if [[ $consecutive -lt $required_matches ]]
77+
then
78+
sleep $interval_seconds
79+
fi
5680
done
57-
echo "Production is up to date with the build commit"
81+
echo "Production is up to date with the build commit ($required_matches consecutive matches)"
5882
5983
- name: Purge Fastly edge cache per language
6084
env:

.github/workflows/test.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ name: Test
33
# **What it does**: Runs our tests.
44
# **Why we have it**: We want our tests to pass before merging code.
55
# **Who does it impact**: Docs engineering, open-source engineering contributors.
6+
#
7+
# For a catalog of what each suite covers and how risky it is to admin-merge
8+
# past it when red, see src/tests/SUITES.md.
69

710
on:
811
workflow_dispatch:

content/actions/reference/runners/larger-runners.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,7 @@ You can choose from several specifications for {% data variables.actions.hosted_
4040
| 64 | 256 GB | 2040 GB | x64 | Ubuntu, Windows |
4141
| 96 | 384 GB | 2040 GB | x64 | Ubuntu, Windows |
4242

43-
>[!NOTE] The 4-vCPU Windows runner only works with the Windows Server 2025 or the Base Windows 11 Desktop image.
44-
45-
>[!NOTE] The 5-vCPU macOS runner is in public preview and subject to change.
43+
> [!NOTE] The 4-vCPU Windows runner only works with the Windows Server 2025 or the Base Windows 11 Desktop image.
4644
4745
### Specifications for GPU {% data variables.actions.hosted_runners %}
4846

content/copilot/concepts/billing/budgets-for-usage-based-billing.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ For a complete view of all licensed users regardless of activity, use the **AI u
3434

3535
### Cost center budget
3636

37-
A cost center budget caps metered charges for a defined group of users or an organization. It does not limit how much a team draws from the pool. It is only active after the shared pool is exhausted.
37+
A cost center budget caps metered charges for a defined group of users or an organization. It does not limit how much a team draws from the pool. It is only active after the shared pool is exhausted. A cost center budget **does not extend or override a user-level budget**: if a user has reached their user-level budget, they are blocked even if their cost center still has remaining budget.
3838

3939
When a cost center's budget is exhausted, only users in that cost center are blocked. Other users and cost centers are unaffected.
4040

@@ -74,7 +74,7 @@ When someone in your enterprise uses {% data variables.product.prodname_copilot_
7474
7575
Each request for an {% data variables.product.prodname_ai_credit_singular %}-consuming feature goes through these checks:
7676

77-
1. **User-level budget check.** The system first checks whether the user has exceeded their user-level budget. If yes, the request is blocked immediately—user-level budgets are always a hard stop. If no (or no ULB is set), the request continues.
77+
1. **User-level budget check.** The system first checks whether the user has exceeded their user-level budget. If yes, the request is blocked immediately. ULBs are always a hard stop, and no other budget can override or supplement them. If no (or no ULB is set), the request continues.
7878
1. **Shared pool check.** Next, the system checks whether the shared pool has {% data variables.product.prodname_ai_credits_short %} remaining. If yes, the request is served from the pool at no extra cost. If the pool is empty, the request moves to metered usage at {% data variables.product.prodname_ai_credits_value %} per {% data variables.product.prodname_ai_credit_singular %}.
7979
1. **Cost center, organization, or enterprise check.** For metered usage, the system checks budgets in the following order:
8080

@@ -89,13 +89,15 @@ Each request for an {% data variables.product.prodname_ai_credit_singular %}-con
8989
9090
## How user-level budgets and spending limits interact
9191

92-
User-level budgets and spending limits are independent controls that serve different purposes. User-level budgets control how much each person can consume. Spending limits control how much metered usage your organization will pay for.
92+
User-level budgets and spending limits are independent controls that serve different purposes. ULBs control how much each person can consume. Spending limits control how much metered usage your organization will pay for.
9393

94-
If these are not aligned, users can get blocked unexpectedly. The system applies a "lowest remaining headroom wins" rule: whichever budget has the least capacity remaining blocks the user first, regardless of what other budgets still have available. For example, if a user has $5 USD remaining on their individual user-level budget but the enterprise budget only has $1 USD remaining, the enterprise budget blocks themeven though their personal budget isn't exhausted.
94+
If these are not aligned, users can get blocked unexpectedly. The system applies a "lowest remaining headroom wins" rule: whichever budget has the least capacity remaining blocks the user first, regardless of what other budgets still have available. For example, if a user has $5 USD remaining on their individual ULB but the enterprise budget only has $1 USD remaining, the enterprise budget blocks them, even though their personal budget isn't exhausted.
9595

96-
This means that if your user-level budgets collectively allow more consumption than the shared pool provides, the difference spills over into metered charges. If your enterprise budget is too low to cover that gap, users get blocked before they reach their individual limits.
96+
This means that if your ULBs collectively allow more consumption than the shared pool provides, the difference spills over into metered charges. If your enterprise budget is too low to cover that gap, users get blocked before they reach their individual limits.
9797

98-
When you raise user-level budgets, check that your spending limits can still cover the resulting gap.
98+
When you raise ULBs, check that your spending limits can still cover the resulting gap.
99+
100+
The reverse is also true: raising a cost center or enterprise budget does not unblock a user who has hit their ULB. For example, if a user exhausts their $5 USD ULB at the same moment the shared pool runs out, they cannot consume from any remaining cost center budget, even if that cost center has $10 USD remaining. The ULB is a total cap on that user's consumption across both pool and metered phases. To unblock them, you must raise their individual ULB or increase the universal ULB.
99101

100102
## Cost center exclusion
101103

0 commit comments

Comments
 (0)