Skip to content

Commit 8257ccf

Browse files
authored
Merge branch 'main' into patch-2
2 parents b9214b7 + 2b2f752 commit 8257ccf

File tree

487 files changed

+30615
-1918
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

487 files changed

+30615
-1918
lines changed

components/article/ToolPicker.tsx

Lines changed: 5 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -12,35 +12,10 @@ import { useArticleContext } from 'components/context/ArticleContext'
1212
// Nota bene: tool === application
1313
// Nota bene: picker === switcher
1414

15-
const supportedTools = [
16-
'cli',
17-
'desktop',
18-
'webui',
19-
'curl',
20-
'codespaces',
21-
'vscode',
22-
'importer_cli',
23-
'graphql',
24-
'powershell',
25-
'bash',
26-
]
27-
const toolTitles = {
28-
webui: 'Web browser',
29-
cli: 'GitHub CLI',
30-
curl: 'cURL',
31-
desktop: 'Desktop',
32-
codespaces: 'Codespaces',
33-
vscode: 'Visual Studio Code',
34-
importer_cli: 'GitHub Enterprise Importer CLI',
35-
graphql: 'GraphQL API',
36-
powershell: 'PowerShell',
37-
bash: 'Bash',
38-
} as Record<string, string>
39-
4015
// Imperatively modify article content to show only the selected tool
4116
// find all platform-specific *block* elements and hide or show as appropriate
4217
// example: {% webui %} block content {% endwebui %}
43-
function showToolSpecificContent(tool: string) {
18+
function showToolSpecificContent(tool: string, supportedTools: Array<string>) {
4419
const markdowns = Array.from(document.querySelectorAll<HTMLElement>('.extended-markdown'))
4520
markdowns
4621
.filter((el) => supportedTools.some((tool) => el.classList.contains(tool)))
@@ -77,7 +52,8 @@ type Props = {
7752
}
7853
export const ToolPicker = ({ variant = 'subnav' }: Props) => {
7954
const { asPath } = useRouter()
80-
const { defaultTool, detectedTools } = useArticleContext()
55+
// allTools comes from the ArticleContext which contains the list of tools available
56+
const { defaultTool, detectedTools, allTools } = useArticleContext()
8157
const [currentTool, setCurrentTool] = useState(getDefaultTool(defaultTool, detectedTools))
8258

8359
const sharedContainerProps = {
@@ -100,7 +76,7 @@ export const ToolPicker = ({ variant = 'subnav' }: Props) => {
10076
// Whenever the currentTool is changed, update the article content
10177
useEffect(() => {
10278
preserveAnchorNodePosition(document, () => {
103-
showToolSpecificContent(currentTool)
79+
showToolSpecificContent(currentTool, Object.keys(allTools))
10480
})
10581
}, [currentTool, asPath])
10682

@@ -137,7 +113,7 @@ export const ToolPicker = ({ variant = 'subnav' }: Props) => {
137113
onClickTool(tool)
138114
}}
139115
>
140-
{toolTitles[tool]}
116+
{allTools[tool]}
141117
</UnderlineNav.Link>
142118
))}
143119
</UnderlineNav>

components/context/ArticleContext.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ export type ArticleContextT = {
2929
currentLearningTrack?: LearningTrack
3030
detectedPlatforms: Array<string>
3131
detectedTools: Array<string>
32+
allTools: Record<string, string>
3233
}
3334

3435
export const ArticleContext = createContext<ArticleContextT | null>(null)
@@ -70,5 +71,6 @@ export const getArticleContextFromRequest = (req: any): ArticleContextT => {
7071
currentLearningTrack: req.context.currentLearningTrack,
7172
detectedPlatforms: page.detectedPlatforms || [],
7273
detectedTools: page.detectedTools || [],
74+
allTools: page.allToolsParsed || [], // this is set at the page level, see lib/page.js
7375
}
7476
}

components/rest/RestReferencePage.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,10 @@ export const RestReferencePage = ({ restOperations }: StructuredContentT) => {
9797
never render anything. It always just return null. */}
9898
{loadClientsideRedirectExceptions && <ClientSideRedirectExceptions />}
9999
{lazyLoadHighlightJS && <ClientSideHighlightJS />}
100-
<div className={cx(styles.restOperation, 'px-3 px-md-6 my-4 container-xl')}>
100+
<div
101+
className={cx(styles.restOperation, 'px-3 px-md-6 my-4 container-xl')}
102+
data-search="article-body"
103+
>
101104
<h1 className="mb-3">{title}</h1>
102105
{intro && (
103106
<Lead data-testid="lead" data-search="lead" className="markdown-body">

content/actions/learn-github-actions/contexts.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ The `github` context contains information about the workflow run and the event t
195195
| `github.event_path` | `string` | The path to the file on the runner that contains the full event webhook payload. |
196196
| `github.graphql_url` | `string` | The URL of the {% data variables.product.prodname_dotcom %} GraphQL API. |
197197
| `github.head_ref` | `string` | The `head_ref` or source branch of the pull request in a workflow run. This property is only available when the event that triggers a workflow run is either `pull_request` or `pull_request_target`. |
198-
| `github.job` | `string` | The [`job_id`](/actions/reference/workflow-syntax-for-github-actions#jobsjob_id) of the current job. |
198+
| `github.job` | `string` | The [`job_id`](/actions/reference/workflow-syntax-for-github-actions#jobsjob_id) of the current job. <br /> Note: This context property is set by the Actions runner, and is only available within the execution `steps` of a job. Otherwise, the value of this property will be `null`. |
199199
| `github.ref` | `string` | The branch or tag ref that triggered the workflow run. For branches this is the format `refs/heads/<branch_name>`, and for tags it is `refs/tags/<tag_name>`. |
200200
{%- ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5338 %}
201201
| `github.ref_name` | `string` | {% data reusables.actions.ref_name-description %} |
@@ -214,7 +214,7 @@ The `github` context contains information about the workflow run and the event t
214214
{%- endif %}
215215
| `github.server_url` | `string` | The URL of the GitHub server. For example: `https://github.com`. |
216216
| `github.sha` | `string` | The commit SHA that triggered the workflow run. |
217-
| `github.token` | `string` | A token to authenticate on behalf of the GitHub App installed on your repository. This is functionally equivalent to the `GITHUB_TOKEN` secret. For more information, see "[Automatic token authentication](/actions/security-guides/automatic-token-authentication)." |
217+
| `github.token` | `string` | A token to authenticate on behalf of the GitHub App installed on your repository. This is functionally equivalent to the `GITHUB_TOKEN` secret. For more information, see "[Automatic token authentication](/actions/security-guides/automatic-token-authentication)." <br /> Note: This context property is set by the Actions runner, and is only available within the execution `steps` of a job. Otherwise, the value of this property will be `null`. |
218218
| `github.workflow` | `string` | The name of the workflow. If the workflow file doesn't specify a `name`, the value of this property is the full path of the workflow file in the repository. |
219219
| `github.workspace` | `string` | The default working directory on the runner for steps, and the default location of your repository when using the [`checkout`](https://github.com/actions/checkout) action. |
220220

content/authentication/managing-commit-signature-verification/about-commit-signature-verification.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ Commits and tags have the following verification statuses, depending on whether
3636
| **Unverified** | The commit is signed but the signature could not be verified.
3737
| No verification status | The commit is not signed.
3838

39+
### Signature verification for rebase and merge
40+
{% data reusables.pull_requests.rebase_and_merge_verification %}
41+
42+
For more information, see "[Rebasing and merging your commits](/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/about-merge-methods-on-github#rebasing-and-merging-your-commits)."
43+
3944
### Statuses with vigilant mode enabled
4045

4146
{% data reusables.identity-and-permissions.vigilant-mode-verification-statuses %}

content/authentication/securing-your-account-with-two-factor-authentication-2fa/configuring-two-factor-authentication.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ A time-based one-time password (TOTP) application automatically generates an aut
5252
{% data reusables.user-settings.access_settings %}
5353
{% data reusables.user-settings.security %}
5454
{% data reusables.two_fa.enable-two-factor-authentication %}
55-
{%- ifversion fpt or ghes > 3.1 %}
55+
{%- ifversion fpt or ghec or ghes > 3.1 %}
5656
5. Under "Two-factor authentication", select **Set up using an app** and click **Continue**.
5757
6. Under "Authentication verification", do one of the following:
5858
- Scan the QR code with your mobile device's app. After scanning, the app displays a six-digit code that you can enter on {% data variables.product.product_name %}.

content/code-security/supply-chain-security/understanding-your-software-supply-chain/about-the-dependency-graph.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ The recommended formats explicitly define which versions are used for all direct
7272
{%- if github-actions-in-dependency-graph %}
7373
| {% data variables.product.prodname_actions %} workflows<sup>[1]</sup> | YAML | `.yml`, `.yaml` | `.yml`, `.yaml` |
7474
{%- endif %}
75-
{%- ifversion fpt or ghes > 3.2 or ghae %}
75+
{%- ifversion fpt or ghec or ghes > 3.2 or ghae %}
7676
| Go modules | Go | `go.sum` | `go.mod`, `go.sum` |
7777
{%- elsif ghes = 3.2 %}
7878
| Go modules | Go | `go.mod` | `go.mod` |

content/communities/using-templates-to-encourage-useful-issues-and-pull-requests/common-validation-errors-when-creating-issue-forms.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,6 @@ Errors with `body` will be prefixed with `body[i]` where `i` represents the zero
311311
body:
312312
- attributes:
313313
value: "Thanks for taking the time to fill out this bug! If you need real-time help, join us on Discord."
314-
preview_only: false
315314
```
316315

317316
The error can be fixed by adding the key `type` with a valid input type as the value. For the available `body` input types and their syntaxes, see "[Syntax for {% data variables.product.prodname_dotcom %}'s form schema](/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema#keys)."
@@ -321,7 +320,6 @@ body:
321320
- type: markdown
322321
attributes:
323322
value: "Thanks for taking the time to fill out this bug! If you need real-time help, join us on Discord."
324-
preview_only: false
325323
```
326324

327325
## Body[i]: `x` is not a valid input type
@@ -337,7 +335,6 @@ body:
337335
- type: x
338336
attributes:
339337
value: "Thanks for taking the time to fill out this bug! If you need real-time help, join us on Discord."
340-
preview_only: false
341338
```
342339

343340
The error can be fixed by changing `x` to one of the valid types.
@@ -347,7 +344,6 @@ body:
347344
- type: markdown
348345
attributes:
349346
value: "Thanks for taking the time to fill out this bug! If you need real-time help, join us on Discord."
350-
preview_only: false
351347
```
352348

353349
## Body[i]: required attribute key `value` is missing
@@ -363,7 +359,6 @@ body:
363359
- type: markdown
364360
attributes:
365361
value: "Thanks for taking the time to fill out this bug! If you need real-time help, join us on Discord."
366-
preview_only: false
367362
- type: markdown
368363
```
369364

@@ -374,7 +369,6 @@ body:
374369
- type: markdown
375370
attributes:
376371
value: "Thanks for taking the time to fill out this bug! If you need real-time help, join us on Discord."
377-
preview_only: false
378372
- type: markdown
379373
attributes:
380374
value: "This is working now!"

content/get-started/writing-on-github/working-with-advanced-formatting/creating-diagrams.md

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,27 @@ For example, you can create a simple map:
4949
<pre>
5050
```geojson
5151
{
52-
"type": "Polygon",
53-
"coordinates": [
54-
[
55-
[-90,30],
56-
[-90,35],
57-
[-90,35],
58-
[-85,35],
59-
[-85,30]
60-
]
52+
"type": "FeatureCollection",
53+
"features": [
54+
{
55+
"type": "Feature",
56+
"id": 1,
57+
"properties": {
58+
"ID": 0
59+
},
60+
"geometry": {
61+
"type": "Polygon",
62+
"coordinates": [
63+
[
64+
[-90,35],
65+
[-90,30],
66+
[-85,30],
67+
[-85,35],
68+
[-90,35]
69+
]
70+
]
71+
}
72+
}
6173
]
6274
}
6375
```

content/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/about-status-checks.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,3 +76,9 @@ To skip or request checks for your commit, add one of the following trailer line
7676
>
7777
request-checks: true"
7878
```
79+
80+
{% ifversion fpt or ghec %}
81+
### Retention of status checks
82+
83+
{% data reusables.pull_requests.retention-checks-data %}
84+
{% endif %}

0 commit comments

Comments
 (0)