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
1 change: 0 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
data/release-notes/
src/bookmarklets/
2 changes: 1 addition & 1 deletion content/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ Links to docs in the `docs-internal` repository must start with a product ID (li

Image paths must start with `/assets` and contain the entire filepath including the file extension. For example, `/assets/images/help/settings/settings-account-delete.png`.

The links to Markdown pages undergo some transformations on the server side to match the current page's language and version. The handling for these transformations lives in [`src/content-render/unified/rewrite-local-links.js`](/src/content-render/unified/rewrite-local-links.js).
The links to Markdown pages undergo some transformations on the server side to match the current page's language and version. The handling for these transformations lives in [`src/content-render/unified/rewrite-local-links.ts`](/src/content-render/unified/rewrite-local-links.ts).

For example, if you include the following link in a content file:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -634,6 +634,7 @@ When Kubernetes mode is enabled, workflows that are not configured with a contai
```

To allow jobs without a job container to run, set `ACTIONS_RUNNER_REQUIRE_JOB_CONTAINER` to `false` on your runner container. This instructs the runner to disable this check.

> [!WARNING]
>Allowing jobs to run without a container in `kubernetes` or `kubernetes-novolume` mode can give the >runner pod elevated privileges with the Kubernetes API server, including the ability to create pods and access secrets. Before changing this default, we recommend carefully reviewing the potential security implications.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,10 @@ To enable {% data variables.product.prodname_dependabot_version_updates %}, you
## Configuring {% ifversion ghas-products %}{% data variables.product.prodname_code_security %}{% else %}{% data variables.product.prodname_code_scanning %}{% endif %}

{% ifversion fpt or ghec %}

> [!NOTE]
> {% data variables.product.prodname_code_security %} features are available for all public repositories, and for private repositories owned by organizations that are part of a team or an enterprise that uses {% data variables.product.prodname_GH_code_security %} or {% data variables.product.prodname_GHAS %}.

{% endif %}

{% ifversion ghas-products %}{% data variables.product.prodname_GH_code_security %} includes {% data variables.product.prodname_code_scanning %}, {% data variables.product.prodname_codeql_cli %} and {% data variables.copilot.copilot_autofix_short %}, as well as other features that find and fix vulnerabilities in your codebase.{% endif %}
Expand All @@ -133,8 +135,10 @@ As an alternative to default setup, you can use advanced setup, which generates
## Configuring {% ifversion ghas-products %}{% data variables.product.prodname_secret_protection %}{% else %}{% data variables.product.prodname_secret_scanning %}{% endif %}

{% ifversion fpt or ghec %}

> [!NOTE]
> {% data variables.product.prodname_secret_protection %} features are available for all public repositories, and for private repositories owned by organizations that are part of a team or an enterprise that uses {% data variables.product.prodname_GH_secret_protection %} or {% data variables.product.prodname_GHAS %}.

{% endif %}

{% ifversion ghas-products %}{% data variables.product.prodname_GH_secret_protection %} includes {% data variables.product.prodname_secret_scanning %} and push protection, as well as other features that help you detect and prevent secret leaks in your repository.{% endif %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,6 @@ When you're ready to stop your local server, type <kbd>Ctrl</kbd>+<kbd>C</kbd> i

If you would like to read more about debugging and troubleshooting the {% data variables.product.prodname_docs %} application, see [AUTOTITLE](/contributing/setting-up-your-environment-to-work-on-github-docs/troubleshooting-your-environment) in the github/docs repository.

### Using browser shortcuts

The [`src/bookmarklets`](https://github.com/github/docs/tree/main/src/bookmarklets) directory in the {% data variables.product.prodname_docs %} repository contains browser shortcuts that can help with reviewing {% data variables.product.company_short %} documentation. For more information, see the directory's [`README`](https://github.com/github/docs/tree/main/src/bookmarklets/README.md).

### Enabling different languages

By default, the local server does not run with all supported languages enabled. If you need to run a local server with a particular language, you can temporarily edit the `start` script in `package.json` and update the `ENABLED_LANGUAGES` variable.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ Links to docs in the `docs` repository must start with a product ID (like `/acti

Image paths must start with `/assets` and contain the entire filepath including the file extension. For example, `/assets/images/help/settings/settings-account-delete.png`.

The links to Markdown pages undergo some transformations on the server side to match the current page's language and version. The handling for these transformations lives in [`lib/render-content/plugins/rewrite-local-links`](https://github.com/github/docs/blob/main/src/content-render/unified/rewrite-local-links.js).
The links to Markdown pages undergo some transformations on the server side to match the current page's language and version. The handling for these transformations lives in [`lib/render-content/plugins/rewrite-local-links`](https://github.com/github/docs/blob/main/src/content-render/unified/rewrite-local-links.ts).

For example, if you include the following link in a content file:

Expand Down
2 changes: 1 addition & 1 deletion content/copilot/reference/ai-models/supported-models.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ This table lists the AI models available in {% data variables.product.prodname_c
| {% data variables.copilot.copilot_claude_sonnet_40 %} | Anthropic | GA | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} |
| {% data variables.copilot.copilot_gemini_25_pro %} | Google | GA | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} |
| {% data variables.copilot.copilot_gemini_flash %} | Google | {% data variables.release-phases.closing_down_caps %}: 2025-10-23 | {% octicon "x" aria-label="Not included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} |
| {% data variables.copilot.copilot_grok_code %} | xAI | {% data variables.release-phases.public_preview_caps %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} |
| {% data variables.copilot.copilot_grok_code %} | xAI | GA | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} |

{% endrowheaders %}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ In this section, you can find the access required for security features, such as

> [!NOTE]
> Repository writers and maintainers can only directly view secret scanning alert information for their own commits. They cannot access the alert list view.

{% rowheaders %}

| Repository action | Read | Triage | Write | Maintain | Admin |
Expand Down
2 changes: 0 additions & 2 deletions contributing/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@ As an alternative, you can simply use [GitHub Codespaces](https://docs.github.co

In a matter of minutes, you will be ready to edit, review and test your changes directly from the comfort of your browser.

### Using browser shortcuts

The [`src/bookmarklets`](../src/bookmarklets) directory contains some browser shortcuts that can help with reviewing GitHub documentation. See [`src/bookmarklets/README.md`](../src/bookmarklets/README.md) for details.

### Enabling different languages

Expand Down
1 change: 0 additions & 1 deletion eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,6 @@ export default [
ignores: [
'tmp/*',
'.next/',
'src/bookmarklets/*',
'rest-api-description/',
'docs-internal-data/',
'src/code-scanning/scripts/generate-code-scanning-query-list.ts',
Expand Down
41 changes: 0 additions & 41 deletions src/bookmarklets/README.md

This file was deleted.

8 changes: 0 additions & 8 deletions src/bookmarklets/open-in-vscode.js

This file was deleted.

1 change: 0 additions & 1 deletion src/bookmarklets/view-in-development.js

This file was deleted.

1 change: 0 additions & 1 deletion src/bookmarklets/view-in-production.js

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// @ts-ignore - markdownlint-rule-helpers doesn't provide TypeScript declarations
import { addError } from 'markdownlint-rule-helpers'

import {
Expand All @@ -17,14 +18,15 @@ import {
isInAllGhes,
} from '@/ghes-releases/scripts/version-utils'
import { deprecated, oldestSupported } from '@/versions/lib/enterprise-server-releases'
import type { RuleParams, RuleErrorCallback } from '@/content-linter/types'

export const liquidIfversionVersions = {
names: ['GHD022', 'liquid-ifversion-versions'],
description:
'Liquid `ifversion`, `elsif`, and `else` tags should be valid and not contain unsupported versions.',
tags: ['liquid', 'versioning'],
asynchronous: true,
function: async (params, onError) => {
function: async (params: RuleParams, onError: RuleErrorCallback) => {
// The versions frontmatter object or all versions if the file
// being processed is a data file.
const fm = getFrontmatter(params.lines)
Expand All @@ -34,7 +36,7 @@ export const liquidIfversionVersions = {
? { ghec: '*', ghes: '*', fpt: '*' }
: fm
? fm.versions
: getFrontmatter(params.frontMatterLines).versions
: getFrontmatter(params.frontMatterLines)?.versions
// This will only contain valid (non-deprecated) and future versions
const fileVersions = getApplicableVersions(fileVersionsFm, '', {
doNotThrow: true,
Expand All @@ -45,7 +47,8 @@ export const liquidIfversionVersions = {
// Array of arrays - each array entry is an array of items that
// make up a full if/elsif/else/endif statement.
// [ [ifversion, elsif, else, endif], [nested ifversion, elsif, else, endif] ]
const condStmtStack = []
// Using any[] because these are complex dynamic objects with properties added at runtime
const condStmtStack: any[] = []

// Tokens are in the order they are read in file, so we need to iterate
// through and group full if/elsif/else/endif statements together.
Expand Down Expand Up @@ -76,25 +79,28 @@ export const liquidIfversionVersions = {
// The versions of an else tag are the set of file versions that are
// not supported by the previous ifversion or elsif tags.
const siblingVersions = condTagItems
.filter((item) => item.name === 'ifversion' || item.name === 'elsif')
.map((item) => item.versions)
// Using any because condTagItems contains dynamic objects from initTagObject
.filter((item: any) => item.name === 'ifversion' || item.name === 'elsif')
.map((item: any) => item.versions)
.flat()
condTagItem.versions = difference(fileVersions, siblingVersions)
// Using any because versions property is added dynamically to condTagItem
;(condTagItem as any).versions = difference(fileVersions, siblingVersions)
condTagItems.push(condTagItem)
condStmtStack.push(condTagItems)
} else if (token.name === 'endif') {
defaultProps.parent = undefined
const condTagItems = condStmtStack.pop()
const condTagItem = await initTagObject(token, defaultProps)
condTagItems.push(condTagItem)
decorateCondTagItems(condTagItems, params.lines)
decorateCondTagItems(condTagItems)
setLiquidErrors(condTagItems, onError, params.lines)
}
}
},
}

function setLiquidErrors(condTagItems, onError, lines) {
// Using any[] because condTagItems contains dynamic objects with properties added at runtime
function setLiquidErrors(condTagItems: any[], onError: RuleErrorCallback, lines: string[]) {
for (let i = 0; i < condTagItems.length; i++) {
const item = condTagItems[i]
const tagNameNoCond = item.name === 'endif' || item.name === 'else'
Expand Down Expand Up @@ -175,8 +181,9 @@ function setLiquidErrors(condTagItems, onError, lines) {
}
}

async function getApplicableVersionFromLiquidTag(conditionStr, filename) {
const newConditionObject = {}
async function getApplicableVersionFromLiquidTag(conditionStr: string) {
// Using Record<string, any> because version object keys are dynamic (fpt, ghec, ghes, feature, etc.)
const newConditionObject: Record<string, any> = {}
const condition = conditionStr.replace('not ', '')
const liquidTagVersions = condition.split(' or ').map((item) => item.trim())
for (const ver of liquidTagVersions) {
Expand Down Expand Up @@ -227,7 +234,8 @@ async function getApplicableVersionFromLiquidTag(conditionStr, filename) {
return newConditionObject
}

async function initTagObject(token, props) {
// Using any for token and props because they come from markdownlint library without full type definitions
async function initTagObject(token: any, props: any) {
const condTagItem = {
name: token.name,
cond: token.content.replace(`${token.name} `, '').trim(),
Expand All @@ -245,15 +253,17 @@ async function initTagObject(token, props) {
parent: props.parent,
}
if (token.name === 'ifversion' || token.name === 'elsif') {
condTagItem.versionsObj = await getApplicableVersionFromLiquidTag(
condTagItem.cond,
props.filename,
)
condTagItem.featureVersionsObj = condTagItem.versionsObj.feature
? getFeatureVersionsObject(condTagItem.versionsObj.feature)
// Using any because these properties (versionsObj, featureVersionsObj, versionsObjAll, versions)
// are added dynamically to condTagItem and not part of its initial type definition
;(condTagItem as any).versionsObj = await getApplicableVersionFromLiquidTag(condTagItem.cond)
;(condTagItem as any).featureVersionsObj = (condTagItem as any).versionsObj.feature
? getFeatureVersionsObject((condTagItem as any).versionsObj.feature)
: undefined
condTagItem.versionsObjAll = { ...condTagItem.versionsObj, ...condTagItem.featureVersionsObj }
condTagItem.versions = getApplicableVersions(condTagItem.versionsObj, '', {
;(condTagItem as any).versionsObjAll = {
...(condTagItem as any).versionsObj,
...(condTagItem as any).featureVersionsObj,
}
;(condTagItem as any).versions = getApplicableVersions((condTagItem as any).versionsObj, '', {
doNotThrow: true,
includeNextVersion: true,
})
Expand All @@ -270,7 +280,8 @@ async function initTagObject(token, props) {
Then create flaws per stack item.
newCond
*/
function decorateCondTagItems(condTagItems, lines) {
// Using any[] because condTagItems contains dynamic objects with action property added at runtime
function decorateCondTagItems(condTagItems: any[]) {
for (const item of condTagItems) {
item.action = {
type: 'none',
Expand All @@ -287,7 +298,8 @@ function decorateCondTagItems(condTagItems, lines) {
return
}

function updateConditionals(condTagItems) {
// Using any[] because condTagItems contains dynamic objects with various properties added at runtime
function updateConditionals(condTagItems: any[]) {
// iterate through the ifversion, elsif, and else
// tags but NOT the endif tag. endif tags have
// no versions associated with them and are handled
Expand Down Expand Up @@ -470,7 +482,8 @@ function updateConditionals(condTagItems) {
}
}

function processConditionals(item, condTagItems, indexOfAllItem) {
// Using any for item and any[] for condTagItems because they contain dynamic objects with action property
function processConditionals(item: any, condTagItems: any[], indexOfAllItem: number) {
item.action.type = 'all'
// if any tag in a statement is 'all', the
// remaining tags are obsolete.
Expand Down
Loading
Loading