Skip to content

Commit 7bf9561

Browse files
authored
Merge pull request #16689 from github/repo-sync
repo sync
2 parents a371d46 + c7741bc commit 7bf9561

File tree

3 files changed

+9
-19
lines changed

3 files changed

+9
-19
lines changed

content/authentication/keeping-your-account-and-data-secure/reviewing-your-security-log.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,8 +239,8 @@ An overview of some of the most common actions that are recorded as events in th
239239
| Action | Description
240240
|--------------------|---------------------
241241
| `add_email` | Triggered when you {% ifversion not ghae %}[add a new email address](/articles/changing-your-primary-email-address){% else %}add a new email address{% endif %}.{% ifversion fpt or ghec %}
242-
| `codespaces_trusted_repo_access_granted` | Triggered when you [allow the codespaces you create for a repository to access other repositories owned by your user account](/github/developing-online-with-codespaces/managing-access-and-security-for-codespaces.
243-
| `codespaces_trusted_repo_access_revoked` | Triggered when you [disallow the codespaces you create for a repository to access other repositories owned by your user account](/github/developing-online-with-codespaces/managing-access-and-security-for-codespaces. {% endif %}
242+
| `codespaces_trusted_repo_access_granted` | Triggered when you [allow the codespaces you create for a repository to access other repositories owned by your user account](/github/developing-online-with-codespaces/managing-access-and-security-for-codespaces).
243+
| `codespaces_trusted_repo_access_revoked` | Triggered when you [disallow the codespaces you create for a repository to access other repositories owned by your user account](/github/developing-online-with-codespaces/managing-access-and-security-for-codespaces). {% endif %}
244244
| `create` | Triggered when you create a new user account.{% ifversion not ghae %}
245245
| `change_password` | Triggered when you change your password.
246246
| `forgot_password` | Triggered when you ask for [a password reset](/articles/how-can-i-reset-my-password).{% endif %}

lib/site-data.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,17 @@ export default function loadSiteData() {
2222
en: loadSiteDataFromDir(languages.en.dir),
2323
}
2424

25-
// load and add other language data to siteData where keys match english keys,
26-
// filling holes with english site data
2725
const englishKeys = Object.keys(flat(siteData.en))
2826
for (const language of Object.values(languages)) {
2927
if (language.code === 'en') continue
3028
const data = loadSiteDataFromDir(language.dir)
29+
const keys = Object.keys(flat(data))
30+
// First set the fallback, which might get used if not overridden
3131
for (const key of englishKeys) {
32-
set(siteData, `${language.code}.${key}`, get(data, key) || get(siteData.en, key))
32+
set(siteData, `${language.code}.${key}`, get(siteData.en, key))
33+
}
34+
for (const key of keys) {
35+
set(siteData, `${language.code}.${key}`, get(data, key))
3336
}
3437
}
3538

tests/content/site-data.js

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { fileURLToPath } from 'url'
22
import path from 'path'
3-
import { get, isPlainObject, has } from 'lodash-es'
3+
import { get, isPlainObject } from 'lodash-es'
44
import flat from 'flat'
55
import walkSync from 'walk-sync'
66
import { ParseError } from 'liquidjs'
@@ -88,17 +88,4 @@ describe('siteData module (English)', () => {
8888
)}`
8989
expect(yamlReusables.length, message).toBe(0)
9090
})
91-
92-
test('all non-English data has matching English data', async () => {
93-
for (const languageCode of Object.keys(data)) {
94-
if (languageCode === 'en') continue
95-
96-
const nonEnglishKeys = Object.keys(flat(data[languageCode]))
97-
for (const key of nonEnglishKeys) {
98-
if (!has(data.en, key)) {
99-
throw new Error(`matching data not found for ${languageCode}.${key}`)
100-
}
101-
}
102-
}
103-
})
10491
})

0 commit comments

Comments
 (0)