Skip to content

Commit be1a66f

Browse files
authored
Merge pull request #40755 from github/repo-sync
Repo sync
2 parents 021ad9d + 1f0df74 commit be1a66f

22 files changed

+378
-275
lines changed

content/authentication/keeping-your-account-and-data-secure/about-authentication-to-github.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ If you need to use multiple accounts on {% data variables.location.product_locat
4848
* You'll create a password when you create your account on {% data variables.product.github %}. We recommend that you use a password manager to generate a random and unique password. For more information, see [AUTOTITLE](/authentication/keeping-your-account-and-data-secure/creating-a-strong-password).{% ifversion fpt or ghec %}
4949
* If you have not enabled 2FA, {% data variables.product.github %} may ask for additional verification when you first sign in from a new or unrecognized device, such as a new browser profile, a browser where the cookies have been deleted, or a new computer. For more information, see [AUTOTITLE](/authentication/keeping-your-account-and-data-secure/verifying-new-devices-when-signing-in).{% endif %} {% ifversion fpt or ghec %}
5050
* **Social login**
51-
* You'll authenticate with one of the supported social login providers (currently only Google is supported) when you create your account on {% data variables.product.github %}. We recommend that you also configure 2FA and add a passkey or a password as an additional account recovery mechanism.
51+
* You'll authenticate with Google or Apple, which are the supported social login providers when you create your account on {% data variables.product.github %}. We recommend that you also configure 2FA and add a passkey or a password as an additional account recovery mechanism.
5252
* If you have an existing account created with a password, you can add your social login email to the account. This allows you to use your social login identity as a first-factor (password) replacement when you sign in to {% data variables.product.github %}.
5353
* You can unlink your social login identities from your {% data variables.product.github %} email settings page. For more information, see [AUTOTITLE](/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-your-personal-account/unlinking-your-email-address-from-a-locked-account) {% endif %}
5454
* **Two-factor authentication (2FA)** (recommended)

content/authentication/keeping-your-account-and-data-secure/sudo-mode.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,4 +93,4 @@ When prompted to authenticate for sudo mode, type your password, then click **Co
9393

9494
Before you can access sudo mode, you must first configure social login. For more information, see [AUTOTITLE](/authentication/keeping-your-account-and-data-secure/about-authentication-to-github).
9595

96-
When prompted to authenticate for sudo mode, type the authentication code sent to your social login email account, then click **Verify**.
96+
When prompted to authenticate for sudo mode, type the authentication code sent to your social login email account, then click **Verify**. If you dont receive the email within few minutes, check your spam folder.

content/get-started/start-your-journey/creating-an-account-on-github.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ topics:
2222

2323
To get started with {% data variables.product.prodname_dotcom %}, you'll need to create a free personal account and verify your email address.
2424

25-
You can also authenticate with the supported social login providers (currently only Google is supported) when you create your account on {% data variables.product.prodname_dotcom %}.
25+
You can also authenticate with Google or Apple - which are the supported social login providers when you create your account on {% data variables.product.prodname_dotcom %}.
26+
For iOS users, even if you have enabled the setting "Hide My Email addresses" for your Apple account, using social login will result in creating a new {% data variables.product.github %} account.
2627

2728
{% data reusables.accounts.your-personal-account %}
2829

content/get-started/using-github/github-mobile.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,7 @@ You can be simultaneously signed into mobile with multiple accounts on {% data v
5858
> [!NOTE]
5959
> Social login is only available for {% data variables.product.prodname_free_user %} and {% data variables.product.prodname_ghe_cloud %} users
6060
61-
You can sign in to {% data variables.product.prodname_mobile %} using a supported social login provider. Currently, only Google is supported for social login on the {% data variables.product.prodname_mobile %} for Android. To use this option, make sure you originally created your {% data variables.product.github %} account using Google.
62-
63-
For iOS users, social login with Google is not supported in {% data variables.product.prodname_mobile %}. Follow the steps below to sign in to {% data variables.product.prodname_mobile %} on iOS using an account that was created with Google:
64-
1. Open the native web browser Safari and sign in to your {% data variables.product.github %} account.
65-
1. Authorize {% data variables.product.prodname_mobile %} in your browser when prompted.
66-
1. If you are unable to sign in through your browser, you can set a password or passkey for your {% data variables.product.github %} account on {% data variables.product.github %}. After setting a password or passkey, use your username and password with two-factor authentication, or a passkey, to sign in to {% data variables.product.prodname_mobile %}.
61+
You can sign in to {% data variables.product.prodname_mobile %} using a supported social login provider. Currently, both Google and Apple are supported for social login on the {% data variables.product.prodname_mobile %} for Android and iOS users. To use this option, make sure you originally created your {% data variables.product.github %} account using the respective social login provider - Google or Apple.
6762

6863
### Prerequisites for {% data variables.enterprise.data_residency_site %} accounts
6964

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@
323323
"esm": "^3.2.25"
324324
},
325325
"engines": {
326-
"node": "^20 || ^22 || ^24"
326+
"node": "^22 || ^24"
327327
},
328328
"cacheDirectories": [
329329
"node_modules",

src/codeql-cli/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ The pipeline is used to generate Markdown files that create article pages on the
88

99
![A flow chart describing how the automation pipeline for CodeQL CLI generates documentation](./codeql-cli-pipeline-flowchart.png)
1010

11-
A [workflow](.github/workflows/sync-codeql-cli.yml) is used to trigger the automation of the CodeQL CLI documentation. The workflow is manually triggered by a member of the GitHub Docs team approximately every two weeks to align to releases of the CodeQL CLI. The workflow takes an input parameter that specifies the branch to pull the source files from in the semmle-code repo. If the branch input is omitted, the workflow will default to the `main` branch.
11+
A [workflow](https://github.com/github/docs-internal/blob/main/.github/workflows/sync-codeql-cli.yml) is used to trigger the automation of the CodeQL CLI documentation. The workflow is manually triggered by a member of the GitHub Docs team approximately every two weeks to align to releases of the CodeQL CLI. The workflow takes an input parameter that specifies the branch to pull the source files from in the semmle-code repo. If the branch input is omitted, the workflow will default to the `main` branch.
1212

1313
The workflow runs the `src/codeql-cli/scripts/sync.js` script, which generates Markdown files under `content/code-security/codeql-cli/codeql-cli-manual`.
1414

@@ -45,4 +45,4 @@ Writers can also add an introduction paragraph _above_ the following Markdown co
4545
Slack: `#docs-engineering`
4646
Repo: `github/docs-engineering`
4747

48-
If you have a question about the CodeQL CLI pipeline, you can ask in the `#docs-engineering` Slack channel. If you notice a problem with the CodeQL CLI pipeline, you can open an issue in the `github/docs-engineering` repository.
48+
If you have a question about the CodeQL CLI pipeline, you can ask in the `#docs-engineering` Slack channel. If you notice a problem with the CodeQL CLI pipeline, you can open an issue in the `github/docs-engineering` repository.

src/content-render/index.js renamed to src/content-render/index.ts

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,26 @@
11
import { renderLiquid } from './liquid/index'
22
import { renderMarkdown, renderUnified } from './unified/index'
33
import { engine } from './liquid/engine'
4+
import type { Context } from '@/types'
45

5-
const globalCache = new Map()
6+
interface RenderOptions {
7+
cache?: boolean | ((template: string, context: Context) => string)
8+
filename?: string
9+
textOnly?: boolean
10+
}
11+
12+
const globalCache = new Map<string, string>()
613

714
// parse multiple times because some templates contain more templates. :]
8-
export async function renderContent(template = '', context = {}, options = {}) {
15+
export async function renderContent(
16+
template = '',
17+
context: Context = {} as Context,
18+
options: RenderOptions = {},
19+
): Promise<string> {
920
// If called with a falsy template, it can't ever become something
1021
// when rendered. We can exit early to save some pointless work.
1122
if (!template) return template
12-
let cacheKey = null
23+
let cacheKey: string | null = null
1324
if (options && options.cache) {
1425
if (!context) throw new Error("If setting 'cache' in options, the 'context' must be set too")
1526
if (typeof options.cache === 'function') {
@@ -21,13 +32,13 @@ export async function renderContent(template = '', context = {}, options = {}) {
2132
throw new Error('cache option must return a string if truthy')
2233
}
2334
if (globalCache.has(cacheKey)) {
24-
return globalCache.get(cacheKey)
35+
return globalCache.get(cacheKey) as string
2536
}
2637
}
2738
try {
2839
template = await renderLiquid(template, context)
2940
if (context.markdownRequested) {
30-
const md = await renderMarkdown(template, context, options)
41+
const md = await renderMarkdown(template, context)
3142

3243
return md
3344
}
@@ -45,7 +56,7 @@ export async function renderContent(template = '', context = {}, options = {}) {
4556
}
4657
}
4758

48-
function getDefaultCacheKey(template, context) {
59+
function getDefaultCacheKey(template: string, context: Context): string {
4960
return `${template}:${context.currentVersion}:${context.currentLanguage}`
5061
}
5162

src/content-render/liquid/engine.js

Lines changed: 0 additions & 54 deletions
This file was deleted.
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
import { Liquid } from 'liquidjs'
2+
import GithubSlugger from 'github-slugger'
3+
// Copilot: When converting data.js to TypeScript, remove the 'as any' assertion for anyData below
4+
import Data from './data'
5+
import Octicon from './octicon'
6+
// Copilot: When converting ifversion.js to TypeScript, remove the 'as any' assertion for anyIfversion below
7+
import Ifversion from './ifversion'
8+
// Copilot: When converting tool.js to TypeScript, remove the 'as any' assertion for anyTool below
9+
import { Tool, tags as toolTags } from './tool'
10+
import { Spotlight, tags as spotlightTags } from './spotlight'
11+
import { Prompt } from './prompt'
12+
import IndentedDataReference from './indented-data-reference'
13+
14+
// Type assertions for .js files without type definitions
15+
// Copilot: Remove these assertions when the corresponding .js files are converted to TypeScript
16+
const anyData = Data as any
17+
const anyIfversion = Ifversion as any
18+
const anyTool = Tool as any
19+
const anySpotlight = Spotlight as any
20+
const anyPrompt = Prompt as any
21+
const anyIndentedDataReference = IndentedDataReference as any
22+
23+
export const engine = new Liquid({
24+
extname: '.html',
25+
dynamicPartials: false,
26+
})
27+
28+
engine.registerTag('indented_data_reference', anyIndentedDataReference)
29+
engine.registerTag('data', anyData)
30+
engine.registerTag('octicon', Octicon)
31+
engine.registerTag('ifversion', anyIfversion)
32+
33+
for (const tag of toolTags) {
34+
engine.registerTag(tag, anyTool)
35+
}
36+
37+
for (const tag in spotlightTags) {
38+
engine.registerTag(tag, anySpotlight)
39+
}
40+
41+
engine.registerTag('prompt', anyPrompt)
42+
43+
/**
44+
* Like the `size` filter, but specifically for
45+
* getting the number of keys in an object
46+
*/
47+
engine.registerFilter('obj_size', (input: Record<string, unknown> | null | undefined): number => {
48+
if (!input) return 0
49+
return Object.keys(input).length
50+
})
51+
52+
/**
53+
* Returns the version number of a GHES version string
54+
* ex: [email protected] => 2.22
55+
*/
56+
engine.registerFilter('version_num', (input: string): string => {
57+
return input.split('@')[1]
58+
})
59+
60+
/**
61+
* Convert the input to a slug
62+
*/
63+
engine.registerFilter('slugify', (input: string): string => {
64+
const slugger = new GithubSlugger()
65+
return slugger.slug(input)
66+
})

0 commit comments

Comments
 (0)