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
22 changes: 0 additions & 22 deletions .github/copilot-instructions.md

This file was deleted.

4 changes: 3 additions & 1 deletion .github/instructions/all.instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ applyTo: "**"

# Copilot instructions for docs.github.com

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.
This repository powers the GitHub Docs site (docs.github.com). It contains both the Next.js application code (TypeScript) and the documentation content (Markdown).

## Creating a pull request

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

## Accessing docs.github.com content programmatically

Expand Down
2 changes: 0 additions & 2 deletions .github/instructions/code.instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,11 @@ For code reviews, follow guidelines, tests, and validate instructions. For creat
- 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`.
- Whenever you create or comment on an issue or pull request, indicate you are GitHub Copilot.
- 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.
- Avoid pull requests with over 300 lines of code changed. When significantly larger, offer to split up into smaller pull requests if possible.
- All new code should be written in TypeScript and not JavaScript.
- 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 commit to `main` branch.
- Do not use git force push, and avoid git rebase.

## Tests
Expand Down
7 changes: 2 additions & 5 deletions .github/instructions/style-guide-summary.instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ applyTo: "content/**,data/**,**/*.md"

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

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

## Core principles

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

## Links

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

## Lists

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

## Product names and variables
## Product names

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

## Word choice
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ If a repository was part of a fork network when it was deleted, the restored rep

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

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

## Restoring a deleted repository

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ There are two types:
* **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.
* **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.

#### When users appear in a universal user-level budget

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.

For a complete view of all licensed users regardless of activity, use the **AI usage** or **Licensing** pages.

### 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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ When you open a pull request, {% data variables.product.github %} creates up to
| `refs/pull/PULL_REQUEST_NUMBER/head` | Points to the latest commit on the pull request's head branch. |
| `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. |

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

```shell
git fetch origin refs/pull/PULL_REQUEST_NUMBER/merge
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ If you want to restore a repository that was part of a fork network that is not

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

Restoring a repository will not restore team permissions. Issues that are restored will not be labeled.
Restoring a repository will not restore team permissions.

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

Expand Down
51 changes: 40 additions & 11 deletions src/automated-pipelines/components/AutomatedPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { MiniTocs } from '@/frame/components/ui/MiniTocs'
import { useAutomatedPageContext } from '@/automated-pipelines/components/AutomatedPageContext'
import { ClientSideHighlight } from '@/frame/components/ClientSideHighlight'
import { Breadcrumbs } from '@/frame/components/page-header/Breadcrumbs'
import { JourneyTrackCard, JourneyTrackNav } from '@/journeys/components'

type Props = {
children?: React.ReactNode
Expand All @@ -18,8 +19,18 @@ type Props = {
}

export const AutomatedPage = ({ children, rawChildren, fullWidth }: Props) => {
const { title, intro, renderedPage, miniTocItems, product, permissions, currentLayout } =
useAutomatedPageContext()
const {
title,
intro,
renderedPage,
miniTocItems,
product,
permissions,
currentLayout,
currentJourneyTrack,
} = useAutomatedPageContext()
const isJourneyTrack = !!currentJourneyTrack?.trackId
const hasTocContent = isJourneyTrack || miniTocItems.length > 1

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

const toc = miniTocItems.length > 1 ? <MiniTocs miniTocItems={miniTocItems} /> : undefined
const toc = hasTocContent ? (
<>
{isJourneyTrack && <JourneyTrackCard journey={currentJourneyTrack} />}
{miniTocItems.length > 1 && <MiniTocs miniTocItems={miniTocItems} />}
</>
) : undefined

return (
<DefaultLayout>
<ClientSideHighlight />

{currentLayout === 'inline' ? (
<ArticleInlineLayout
topper={<ArticleTitle>{title}</ArticleTitle>}
intro={introProp}
toc={toc}
breadcrumbs={<Breadcrumbs />}
>
{articleContents}
</ArticleInlineLayout>
<>
<ArticleInlineLayout
topper={<ArticleTitle>{title}</ArticleTitle>}
intro={introProp}
toc={toc}
breadcrumbs={<Breadcrumbs />}
>
{articleContents}
</ArticleInlineLayout>
{isJourneyTrack ? (
<div className="container-lg mt-4 px-3">
<JourneyTrackNav context={currentJourneyTrack} />
</div>
) : null}
</>
) : (
<div className="container-xl px-3 px-md-6 my-4">
<ArticleGridLayout
Expand All @@ -72,6 +95,12 @@ export const AutomatedPage = ({ children, rawChildren, fullWidth }: Props) => {
>
{articleContents}
</ArticleGridLayout>

{isJourneyTrack ? (
<div className="container-lg mt-4 px-3">
<JourneyTrackNav context={currentJourneyTrack} />
</div>
) : null}
</div>
)}
</DefaultLayout>
Expand Down
3 changes: 3 additions & 0 deletions src/automated-pipelines/components/AutomatedPageContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { createContext, useContext } from 'react'
import type { IncomingMessage } from 'http'
import type { JSX } from 'react'
import type { MiniTocItem } from '@/frame/components/context/ArticleContext'
import type { JourneyContext } from '@/journeys/lib/journey-path-resolver'
import type { Context } from '@/types'

export type AutomatedPageContextT = {
Expand All @@ -12,6 +13,7 @@ export type AutomatedPageContextT = {
product?: string
permissions?: string
currentLayout?: string
currentJourneyTrack?: JourneyContext | null
}

export const AutomatedPageContext = createContext<AutomatedPageContextT | null>(null)
Expand Down Expand Up @@ -59,5 +61,6 @@ export const getAutomatedPageContextFromRequest = (
product: page.product ?? '',
permissions: page.permissions ?? page.rawPermissions ?? '',
currentLayout: context.currentLayoutName ?? 'default',
currentJourneyTrack: (context.currentJourneyTrack as JourneyContext | null | undefined) ?? null,
}
}
3 changes: 3 additions & 0 deletions src/frame/components/context/MainContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,9 @@ export const getMainContext = async (req: any, res: any): Promise<MainContextT>

const ui: UIStrings = {}
addUINamespaces(req, ui, DEFAULT_UI_NAMESPACES)
if (req.context.currentJourneyTrack?.trackId) {
addUINamespaces(req, ui, ['journey_track_nav'])
}

// Product index pages (depth-2 index.md, e.g. actions/index.md) need the
// full product tree for landing rendering.
Expand Down
26 changes: 13 additions & 13 deletions src/secret-scanning/data/pattern-docs/fpt/public-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
isPrivateWithGhas: true
hasPushProtection: true
hasValidityCheck: false
hasExtendedMetadata: false
hasExtendedMetadata: '{% ifversion ghes %}false{% else %}true{% endif %}'
base64Supported: false
isduplicate: false
- provider: Airtable
Expand All @@ -115,7 +115,7 @@
isPrivateWithGhas: true
hasPushProtection: true
hasValidityCheck: true
hasExtendedMetadata: false
hasExtendedMetadata: '{% ifversion ghes %}false{% else %}true{% endif %}'
base64Supported: false
isduplicate: false
- provider: Aiven
Expand Down Expand Up @@ -144,7 +144,7 @@
isPublic: true
isPrivateWithGhas: true
hasPushProtection: true
hasValidityCheck: false
hasValidityCheck: true
hasExtendedMetadata: false
base64Supported: false
isduplicate: false
Expand Down Expand Up @@ -356,7 +356,7 @@
isPublic: true
isPrivateWithGhas: true
hasPushProtection: true
hasValidityCheck: false
hasValidityCheck: '{% ifversion ghes %}false{% else %}true{% endif %}'
hasExtendedMetadata: false
base64Supported: false
isduplicate: false
Expand All @@ -366,7 +366,7 @@
isPublic: true
isPrivateWithGhas: true
hasPushProtection: true
hasValidityCheck: false
hasValidityCheck: '{% ifversion ghes %}false{% else %}true{% endif %}'
hasExtendedMetadata: false
base64Supported: false
isduplicate: false
Expand All @@ -376,7 +376,7 @@
isPublic: true
isPrivateWithGhas: true
hasPushProtection: true
hasValidityCheck: false
hasValidityCheck: '{% ifversion ghes %}false{% else %}true{% endif %}'
hasExtendedMetadata: false
base64Supported: false
isduplicate: false
Expand Down Expand Up @@ -466,7 +466,7 @@
isPublic: true
isPrivateWithGhas: true
hasPushProtection: true
hasValidityCheck: false
hasValidityCheck: '{% ifversion ghes %}false{% else %}true{% endif %}'
hasExtendedMetadata: false
base64Supported: false
isduplicate: false
Expand Down Expand Up @@ -516,7 +516,7 @@
isPublic: true
isPrivateWithGhas: true
hasPushProtection: true
hasValidityCheck: false
hasValidityCheck: '{% ifversion ghes %}false{% else %}true{% endif %}'
hasExtendedMetadata: false
base64Supported: false
isduplicate: false
Expand Down Expand Up @@ -546,7 +546,7 @@
isPublic: true
isPrivateWithGhas: true
hasPushProtection: true
hasValidityCheck: false
hasValidityCheck: '{% ifversion ghes %}false{% else %}true{% endif %}'
hasExtendedMetadata: false
base64Supported: false
isduplicate: false
Expand All @@ -556,7 +556,7 @@
isPublic: true
isPrivateWithGhas: true
hasPushProtection: true
hasValidityCheck: false
hasValidityCheck: '{% ifversion ghes %}false{% else %}true{% endif %}'
hasExtendedMetadata: false
base64Supported: false
isduplicate: false
Expand Down Expand Up @@ -586,7 +586,7 @@
isPublic: true
isPrivateWithGhas: true
hasPushProtection: true
hasValidityCheck: false
hasValidityCheck: '{% ifversion ghes %}false{% else %}true{% endif %}'
hasExtendedMetadata: false
base64Supported: false
isduplicate: false
Expand Down Expand Up @@ -896,7 +896,7 @@
isPublic: true
isPrivateWithGhas: true
hasPushProtection: true
hasValidityCheck: false
hasValidityCheck: '{% ifversion ghes %}false{% else %}true{% endif %}'
hasExtendedMetadata: false
base64Supported: false
isduplicate: false
Expand Down Expand Up @@ -1026,7 +1026,7 @@
isPublic: true
isPrivateWithGhas: true
hasPushProtection: true
hasValidityCheck: false
hasValidityCheck: '{% ifversion ghes %}false{% else %}true{% endif %}'
hasExtendedMetadata: false
base64Supported: false
isduplicate: false
Expand Down
Loading
Loading