Skip to content

Commit 9d37d54

Browse files
authored
Merge pull request #44609 from github/repo-sync
Repo sync
2 parents 6b06504 + 22816cb commit 9d37d54

13 files changed

Lines changed: 86 additions & 70 deletions

File tree

.github/copilot-instructions.md

Lines changed: 0 additions & 22 deletions
This file was deleted.

.github/instructions/all.instructions.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ applyTo: "**"
44

55
# Copilot instructions for docs.github.com
66

7-
This repository contains code to run the GitHub Docs site on docs.github.com, as well as the content that the site displays. We write the code in JavaScript and TypeScript, and we write the content primarily in Markdown.
7+
This repository powers the GitHub Docs site (docs.github.com). It contains both the Next.js application code (TypeScript) and the documentation content (Markdown).
88

99
## Creating a pull request
1010

@@ -29,6 +29,8 @@ When you create a pull request:
2929
3. Label with "llm-generated".
3030
4. If an issue exists, include "fixes owner/repo#issue" or "towards owner/repo#issue" as appropriate.
3131
5. Always create PRs in **draft mode** using `--draft` flag.
32+
6. Do not commit directly to `main`.
33+
7. Whenever you create or comment on an issue or pull request, indicate you are GitHub Copilot.
3234

3335
## Accessing docs.github.com content programmatically
3436

.github/instructions/code.instructions.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,11 @@ For code reviews, follow guidelines, tests, and validate instructions. For creat
1111
- If available, use ripgrep (`rg`) instead of `grep`.
1212
- When using gh cli in double-quoted strings, escape backticks to prevent bash command substitution. In single-quoted strings, backticks do not need escaping.
1313
- All scripts should be listed in `package.json` and use `tsx`.
14-
- Whenever you create or comment on an issue or pull request, indicate you are GitHub Copilot.
1514
- Be careful fetching full HTML pages off the internet. Prefer to use MCP or gh cli whenever possible for github.com. Limit the number of tokens when grabbing HTML.
1615
- Avoid pull requests with over 300 lines of code changed. When significantly larger, offer to split up into smaller pull requests if possible.
1716
- All new code should be written in TypeScript and not JavaScript.
1817
- 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'`
1918
- For updates to the content linter, read important information in `src/content-linter/README.md`.
20-
- Do not commit to `main` branch.
2119
- Do not use git force push, and avoid git rebase.
2220

2321
## Tests

.github/instructions/style-guide-summary.instructions.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ applyTo: "content/**,data/**,**/*.md"
66

77
**When to use**: Any content editing, documentation writing, or Markdown file changes. This is a condensed version of the full style guide at `/content/contributing/style-guide-and-content-model/style-guide.md`. Use these rules for routine work. Only consult the full style guide if you encounter a style question not covered here.
88

9-
For Liquid variable usage, reusables, linking conventions, bullet-list formatting, and parenthetical dashes, see `content.instructions.md` (loaded automatically alongside this file).
9+
For Liquid variable usage, reusables, linking conventions, bullet-list markers, and parenthetical dashes, see `content.instructions.md` (loaded automatically alongside this file).
1010

1111
## Core principles
1212

@@ -52,15 +52,13 @@ For Liquid variable usage, reusables, linking conventions, bullet-list formattin
5252

5353
## Links
5454

55-
* Use `[AUTOTITLE](/path/to/article)` for all internal links. Never hardcode article titles in link text.
5655
* Introduce links with "For more information, see" or "See" when context is clear.
5756
* Do not use inline links where words within a sentence are hyperlinked without additional context.
5857
* Do not include punctuation inside a hyperlink.
5958
* Do not repeat the same link more than once in the same article.
6059

6160
## Lists
6261

63-
* Use `*` (asterisks) for unordered lists, never `-` (hyphens).
6462
* Capitalize the first letter of each list item.
6563
* Use periods only if the item is a complete sentence.
6664
* Introduce lists with a descriptive sentence, not vague phrases like "the following" in isolation.
@@ -83,9 +81,8 @@ For Liquid variable usage, reusables, linking conventions, bullet-list formattin
8381
* Use full words for Apple modifier keys (`Command`, `Option`, `Control`), not symbols.
8482
* Capitalize letter keys.
8583

86-
## Product names and variables
84+
## Product names
8785

88-
* Always use Liquid variables for product names—never hardcode them. Check `data/variables/product.yml` and `data/variables/copilot.yml`.
8986
* Product names are always singular (for example, "GitHub Actions helps" not "help").
9087

9188
## Word choice

content/admin/managing-accounts-and-repositories/managing-repositories-in-your-enterprise/restoring-a-deleted-repository.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ If a repository was part of a fork network when it was deleted, the restored rep
2121

2222
It can take up to an hour after a repository is deleted before that repository is available for restoration.
2323

24-
Restoring a repository will not restore release attachments or team permissions. Issues that are restored will not be labeled.
24+
Restoring a repository will not restore release attachments or team permissions.
2525

2626
## Restoring a deleted repository
2727

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@ There are two types:
2626
* **Universal user-level budget:** A default budget applied to every {% data variables.product.prodname_copilot_short %}-licensed user in your enterprise. This is your primary tool for ensuring fair access to the shared pool.
2727
* **Individual user-level budget:** A budget set for a specific user, which overrides the universal default and takes precedence over it entirely. Use this for power users who need higher limits, or to restrict specific users to a lower amount.
2828

29+
#### When users appear in a universal user-level budget
30+
31+
A universal user-level budget can apply to thousands of licensed users. {% data variables.product.github %} creates each user's budget record the first time they consume {% data variables.product.prodname_ai_credits_short %} after the budget is created, or after the start of a new billing cycle. As a result, users appear in the universal budget list gradually rather than all at once, and a licensed user who does not use {% data variables.product.prodname_copilot_short %} in a given billing cycle will not appear in the list for that billing cycle.
32+
33+
For a complete view of all licensed users regardless of activity, use the **AI usage** or **Licensing** pages.
34+
2935
### Cost center budget
3036

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

content/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ When you open a pull request, {% data variables.product.github %} creates up to
4646
| `refs/pull/PULL_REQUEST_NUMBER/head` | Points to the latest commit on the pull request's head branch. |
4747
| `refs/pull/PULL_REQUEST_NUMBER/merge` | A merge branch—a simulated merge commit that represents what the repository would look like if the pull request were merged right now. This ref is only available when the pull request has no merge conflicts. |
4848

49-
The merge branch automatically updates when the head branch or base branch changes. To fetch it locally:
49+
The merge branch automatically updates when the head branch changes. To fetch it locally:
5050

5151
```shell
5252
git fetch origin refs/pull/PULL_REQUEST_NUMBER/merge

content/repositories/creating-and-managing-repositories/restoring-a-deleted-repository.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ If you want to restore a repository that was part of a fork network that is not
3636

3737
It can take up to an hour after a repository is deleted before that repository is available for restoration.
3838

39-
Restoring a repository will not restore team permissions. Issues that are restored will not be labeled.
39+
Restoring a repository will not restore team permissions.
4040

4141
## Restoring a deleted repository that was owned by a personal account
4242

src/automated-pipelines/components/AutomatedPage.tsx

Lines changed: 40 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import { MiniTocs } from '@/frame/components/ui/MiniTocs'
1010
import { useAutomatedPageContext } from '@/automated-pipelines/components/AutomatedPageContext'
1111
import { ClientSideHighlight } from '@/frame/components/ClientSideHighlight'
1212
import { Breadcrumbs } from '@/frame/components/page-header/Breadcrumbs'
13+
import { JourneyTrackCard, JourneyTrackNav } from '@/journeys/components'
1314

1415
type Props = {
1516
children?: React.ReactNode
@@ -18,8 +19,18 @@ type Props = {
1819
}
1920

2021
export const AutomatedPage = ({ children, rawChildren, fullWidth }: Props) => {
21-
const { title, intro, renderedPage, miniTocItems, product, permissions, currentLayout } =
22-
useAutomatedPageContext()
22+
const {
23+
title,
24+
intro,
25+
renderedPage,
26+
miniTocItems,
27+
product,
28+
permissions,
29+
currentLayout,
30+
currentJourneyTrack,
31+
} = useAutomatedPageContext()
32+
const isJourneyTrack = !!currentJourneyTrack?.trackId
33+
const hasTocContent = isJourneyTrack || miniTocItems.length > 1
2334

2435
const articleContents = (
2536
<div id="article-contents">
@@ -40,21 +51,33 @@ export const AutomatedPage = ({ children, rawChildren, fullWidth }: Props) => {
4051
</>
4152
)
4253

43-
const toc = miniTocItems.length > 1 ? <MiniTocs miniTocItems={miniTocItems} /> : undefined
54+
const toc = hasTocContent ? (
55+
<>
56+
{isJourneyTrack && <JourneyTrackCard journey={currentJourneyTrack} />}
57+
{miniTocItems.length > 1 && <MiniTocs miniTocItems={miniTocItems} />}
58+
</>
59+
) : undefined
4460

4561
return (
4662
<DefaultLayout>
4763
<ClientSideHighlight />
4864

4965
{currentLayout === 'inline' ? (
50-
<ArticleInlineLayout
51-
topper={<ArticleTitle>{title}</ArticleTitle>}
52-
intro={introProp}
53-
toc={toc}
54-
breadcrumbs={<Breadcrumbs />}
55-
>
56-
{articleContents}
57-
</ArticleInlineLayout>
66+
<>
67+
<ArticleInlineLayout
68+
topper={<ArticleTitle>{title}</ArticleTitle>}
69+
intro={introProp}
70+
toc={toc}
71+
breadcrumbs={<Breadcrumbs />}
72+
>
73+
{articleContents}
74+
</ArticleInlineLayout>
75+
{isJourneyTrack ? (
76+
<div className="container-lg mt-4 px-3">
77+
<JourneyTrackNav context={currentJourneyTrack} />
78+
</div>
79+
) : null}
80+
</>
5881
) : (
5982
<div className="container-xl px-3 px-md-6 my-4">
6083
<ArticleGridLayout
@@ -72,6 +95,12 @@ export const AutomatedPage = ({ children, rawChildren, fullWidth }: Props) => {
7295
>
7396
{articleContents}
7497
</ArticleGridLayout>
98+
99+
{isJourneyTrack ? (
100+
<div className="container-lg mt-4 px-3">
101+
<JourneyTrackNav context={currentJourneyTrack} />
102+
</div>
103+
) : null}
75104
</div>
76105
)}
77106
</DefaultLayout>

src/automated-pipelines/components/AutomatedPageContext.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { createContext, useContext } from 'react'
22
import type { IncomingMessage } from 'http'
33
import type { JSX } from 'react'
44
import type { MiniTocItem } from '@/frame/components/context/ArticleContext'
5+
import type { JourneyContext } from '@/journeys/lib/journey-path-resolver'
56
import type { Context } from '@/types'
67

78
export type AutomatedPageContextT = {
@@ -12,6 +13,7 @@ export type AutomatedPageContextT = {
1213
product?: string
1314
permissions?: string
1415
currentLayout?: string
16+
currentJourneyTrack?: JourneyContext | null
1517
}
1618

1719
export const AutomatedPageContext = createContext<AutomatedPageContextT | null>(null)
@@ -59,5 +61,6 @@ export const getAutomatedPageContextFromRequest = (
5961
product: page.product ?? '',
6062
permissions: page.permissions ?? page.rawPermissions ?? '',
6163
currentLayout: context.currentLayoutName ?? 'default',
64+
currentJourneyTrack: (context.currentJourneyTrack as JourneyContext | null | undefined) ?? null,
6265
}
6366
}

0 commit comments

Comments
 (0)