Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,5 @@
# Site Policy
content/site-policy/ @github/site-policy-admins

# Enterprise
data/release-notes/**/*.yml @github/docs-content-enterprise
src/ghes-releases/lib/enterprise-dates.json @github/docs-content-enterprise

# Requires review of #actions-oidc-integration, docs-engineering/issues/1506
# content/actions/deployment/security-hardening-your-deployments/** @github/oidc
1 change: 1 addition & 0 deletions .github/actions/create-workflow-failure-issue/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,5 +89,6 @@ runs:
gh issue create \
--repo "$ISSUE_REPO" \
--label "workflow-failure" \
--label "workflow-generated" \
--title "[Workflow Failure] $WORKFLOW_NAME" \
--body "$body"
30 changes: 5 additions & 25 deletions .github/instructions/code.instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ applyTo: "src/**,.github/**,config/**,.devcontainer/**,**Dockerfile,package*.jso

# Copilot code instructions for docs.github.com

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

## Guidelines

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

## Tests

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

## Steps

0. Ask the human if they would like you to follow these steps.
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`.
2. If the human provides a GitHub issue, use MCP or gh cli to read the issue and all comments.
3. Begin by evaluating impact, effort, and estimate non-test lines of code that will change. Ask for more context and examples if needed.
4. If you are running in agentic mode, _stop_ at this point and request approval from the human.
5. If you need to add or change tests, work on tests before implementing.
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.
7. Validate your changes before making any commits. See "Validate".
8. Validate that any new or changed tests pass. See "Tests".
9. Validate that these changes meet our guidelines. See "Guidelines".
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.
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.
12. If this is new work and no pull request exists yet, make a pull request:
- label "llm-generated"
- draft mode
- include "fixes owner/repo#issue" or "towards owner/repo#issue" as appropriate
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.
14. If you are in agentic mode, offer to do any or all of:
- mark the pull request as ready,
- assign the issue to the human if it is not already assigned,
- _concisely_ comment on the issue explaining the change, indicating you are GitHub Copilot.

## Logger

Use `createLogger` from `@/observability/logger` instead of `console.log` in server-side code.
Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/orphaned-files-check.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: 'Orphaned files check'

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

Expand All @@ -16,6 +16,7 @@ on:
- 'package*.json'
- src/assets/scripts/find-orphaned-assets.ts
- src/content-render/scripts/reusables-cli/find/unused.ts
- src/data-directory/scripts/find-orphaned-tables.ts
- src/workflows/walk-files.ts
- src/languages/lib/languages.ts
- .github/actions/clone-translations/action.yml
Expand Down Expand Up @@ -67,14 +68,18 @@ jobs:
# information about the npm script alias.
assetFilesToRemove=$(npm run -s find-orphaned-assets)
reusableFilesToRemove=$(npm run -s reusables -- find unused | grep '^data/reusables' || true)
[ -z "$assetFilesToRemove" ] && [ -z "$reusableFilesToRemove" ] && exit 0
tableFilesToRemove=$(npm run -s find-orphaned-tables)
[ -z "$assetFilesToRemove" ] && [ -z "$reusableFilesToRemove" ] && [ -z "$tableFilesToRemove" ] && exit 0

if [ -n "$assetFilesToRemove" ]; then
echo $assetFilesToRemove | xargs git rm
fi
if [ -n "$reusableFilesToRemove" ]; then
echo $reusableFilesToRemove | xargs git rm
fi
if [ -n "$tableFilesToRemove" ]; then
echo $tableFilesToRemove | xargs git rm
fi

git status

Expand All @@ -100,11 +105,11 @@ jobs:
git push origin $branchname

body=$(cat <<-EOM
Found with the `npm run find-orphaned-assets` and `npm run -s reusables -- find unused` scripts.
Found with the `npm run find-orphaned-assets`, `npm run -s reusables -- find unused`, and `npm run find-orphaned-tables` scripts.

The orphaned files workflow file .github/workflows/orphaned-files-check.yml runs every Monday at 16:20 UTC / 8:20 PST.

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.
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.

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).

Expand Down
36 changes: 30 additions & 6 deletions .github/workflows/purge-fastly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,23 +38,47 @@ jobs:

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

- name: Wait for production to match build number
- name: Wait for production to match build commit SHA
if: github.event_name != 'workflow_dispatch'
# A single /_build match only proves *one* Moda instance is serving the
# new build; others can still be mid-rollout. If we purge then, Fastly's
# soft purge serves stale-while-revalidate and may revalidate against a
# lagging instance, re-caching old content as fresh for a full TTL. So we
# require several consecutive matches to confirm the rollout has settled
# across instances before purging.
run: |
needs=$(git rev-parse HEAD)
start_time=$(date +%s)
timeout_seconds=1200
while [[ $needs != $(curl -s --fail --retry-connrefused --retry 5 https://docs.github.com/_build) ]]
required_matches=5
interval_seconds=10
consecutive=0
while [[ $consecutive -lt $required_matches ]]
do
if [[ $(($(date +%s) - $start_time)) -gt $timeout_seconds ]]
then
echo "Production did not match the build number within $timeout_seconds seconds"
echo "Production did not reach $required_matches consecutive build matches within $timeout_seconds seconds"
exit 1
fi
echo "Production is not up to date with the build commit"
sleep 10
if [[ $needs == $(curl -s --fail --retry-connrefused --retry 5 https://docs.github.com/_build) ]]
then
consecutive=$((consecutive + 1))
echo "Production matches the build commit ($consecutive/$required_matches)"
else
if [[ $consecutive -gt 0 ]]
then
echo "Production stopped matching the build commit; resetting consecutive count"
else
echo "Production is not up to date with the build commit"
fi
consecutive=0
fi
if [[ $consecutive -lt $required_matches ]]
then
sleep $interval_seconds
fi
done
echo "Production is up to date with the build commit"
echo "Production is up to date with the build commit ($required_matches consecutive matches)"

- name: Purge Fastly edge cache per language
env:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ name: Test
# **What it does**: Runs our tests.
# **Why we have it**: We want our tests to pass before merging code.
# **Who does it impact**: Docs engineering, open-source engineering contributors.
#
# For a catalog of what each suite covers and how risky it is to admin-merge
# past it when red, see src/tests/SUITES.md.

on:
workflow_dispatch:
Expand Down
4 changes: 1 addition & 3 deletions content/actions/reference/runners/larger-runners.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,7 @@ You can choose from several specifications for {% data variables.actions.hosted_
| 64 | 256 GB | 2040 GB | x64 | Ubuntu, Windows |
| 96 | 384 GB | 2040 GB | x64 | Ubuntu, Windows |

>[!NOTE] The 4-vCPU Windows runner only works with the Windows Server 2025 or the Base Windows 11 Desktop image.

>[!NOTE] The 5-vCPU macOS runner is in public preview and subject to change.
> [!NOTE] The 4-vCPU Windows runner only works with the Windows Server 2025 or the Base Windows 11 Desktop image.

### Specifications for GPU {% data variables.actions.hosted_runners %}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ For a complete view of all licensed users regardless of activity, use the **AI u

### Cost center budget

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 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.

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

Expand Down Expand Up @@ -74,7 +74,7 @@ When someone in your enterprise uses {% data variables.product.prodname_copilot_

Each request for an {% data variables.product.prodname_ai_credit_singular %}-consuming feature goes through these checks:

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.
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.
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 %}.
1. **Cost center, organization, or enterprise check.** For metered usage, the system checks budgets in the following order:

Expand All @@ -89,13 +89,15 @@ Each request for an {% data variables.product.prodname_ai_credit_singular %}-con

## How user-level budgets and spending limits interact

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.
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.

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.
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.

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.
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.

When you raise user-level budgets, check that your spending limits can still cover the resulting gap.
When you raise ULBs, check that your spending limits can still cover the resulting gap.

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.

## Cost center exclusion

Expand Down
Loading
Loading