Skip to content

Commit 83167c7

Browse files
authored
Merge branch 'main' into patch-1
2 parents 14ec7ad + 8017c76 commit 83167c7

File tree

4,639 files changed

+203582
-3149
lines changed

Some content is hidden

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

4,639 files changed

+203582
-3149
lines changed

.github/actions/rendered-content-link-checker.js

+47-4
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,15 @@ const deprecatedVersionPrefixesRegex = new RegExp(
7777
// When this file is invoked directly from action as opposed to being imported
7878
if (import.meta.url.endsWith(process.argv[1])) {
7979
// Optional env vars
80-
const { ACTION_RUN_URL, LEVEL, FILES_CHANGED, REPORT_REPOSITORY, REPORT_AUTHOR, REPORT_LABEL } =
81-
process.env
80+
const {
81+
ACTION_RUN_URL,
82+
LEVEL,
83+
FILES_CHANGED,
84+
REPORT_REPOSITORY,
85+
REPORT_AUTHOR,
86+
REPORT_LABEL,
87+
EXTERNAL_SERVER_ERRORS_AS_WARNINGS,
88+
} = process.env
8289

8390
const octokit = github()
8491

@@ -113,6 +120,7 @@ if (import.meta.url.endsWith(process.argv[1])) {
113120
reportLabel: REPORT_LABEL,
114121
reportAuthor: REPORT_AUTHOR,
115122
actionContext: getActionContext(),
123+
externalServerErrorsAsWarning: EXTERNAL_SERVER_ERRORS_AS_WARNINGS,
116124
}
117125

118126
if (opts.shouldComment || opts.createReport) {
@@ -155,6 +163,7 @@ if (import.meta.url.endsWith(process.argv[1])) {
155163
* random {boolean} - Randomize page order for debugging when true
156164
* patient {boolean} - Wait longer and retry more times for rate-limited external URLS
157165
* bail {boolean} - Throw an error on the first page (not permalink) that has >0 flaws
166+
* externalServerErrorsAsWarning {boolean} - Treat >=500 errors or temporary request errors as warning
158167
*
159168
*/
160169
async function main(core, octokit, uploadArtifact, opts = {}) {
@@ -583,6 +592,7 @@ async function processPermalink(core, permalink, page, pageMap, redirects, opts,
583592
checkExternalLinks,
584593
verbose,
585594
patient,
595+
externalServerErrorsAsWarning,
586596
} = opts
587597
const html = await renderInnerHTML(page, permalink)
588598
const $ = cheerio.load(html)
@@ -613,6 +623,7 @@ async function processPermalink(core, permalink, page, pageMap, redirects, opts,
613623
pageMap,
614624
checkAnchors,
615625
checkExternalLinks,
626+
externalServerErrorsAsWarning,
616627
{ verbose, patient },
617628
db
618629
)
@@ -758,6 +769,7 @@ async function checkHrefLink(
758769
pageMap,
759770
checkAnchors = false,
760771
checkExternalLinks = false,
772+
externalServerErrorsAsWarning = false,
761773
{ verbose = false, patient = false } = {},
762774
db = null
763775
) {
@@ -815,11 +827,39 @@ async function checkHrefLink(
815827
}
816828
const { ok, ...info } = await checkExternalURLCached(core, href, { verbose, patient }, db)
817829
if (!ok) {
818-
return { CRITICAL: `Broken external link (${JSON.stringify(info)})`, isExternal: true }
830+
// By default, an not-OK problem with an external link is CRITICAL
831+
// but if it was a `responseError` or the statusCode was >= 500
832+
// then downgrade it to WARNING.
833+
let problem = 'CRITICAL'
834+
if (externalServerErrorsAsWarning) {
835+
if (
836+
(info.statusCode && info.statusCode >= 500) ||
837+
(info.requestError && isTemporaryRequestError(info.requestError))
838+
) {
839+
problem = 'WARNING'
840+
}
841+
}
842+
return { [problem]: `Broken external link (${JSON.stringify(info)})`, isExternal: true }
819843
}
820844
}
821845
}
822846

847+
// Return true if the request error is sufficiently temporary. For example,
848+
// a request to `https://exammmmple.org` will fail with `ENOTFOUND` because
849+
// the DNS entry doesn't exist. It means it won't have much hope if you
850+
// simply try again later.
851+
// However, an `ETIMEDOUT` means it could work but it didn't this time but
852+
// might if we try again a different hour or day.
853+
function isTemporaryRequestError(requestError) {
854+
if (typeof requestError === 'string') {
855+
// See https://betterstack.com/community/guides/scaling-nodejs/nodejs-errors/
856+
// for a definition of each one.
857+
const errorEnums = ['ECONNRESET', 'ECONNREFUSED', 'ETIMEDOUT', 'ECONNABORTED']
858+
return errorEnums.some((enum_) => requestError.includes(enum_))
859+
}
860+
return false
861+
}
862+
823863
// Can't do this memoization within the checkExternalURL because it can
824864
// return a Promise since it already collates multiple URLs under the
825865
// same cache key.
@@ -844,7 +884,10 @@ async function checkExternalURLCached(core, href, { verbose, patient }, db) {
844884
}
845885
}
846886

847-
const result = await checkExternalURL(core, href, { verbose, patient })
887+
const result = await checkExternalURL(core, href, {
888+
verbose,
889+
patient,
890+
})
848891

849892
if (cacheMaxAge) {
850893
// By only cache storing successful results, we give the system a chance

.github/workflows/link-check-daily.yml

+3
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@ jobs:
7777
# But mind you that the number has a 10% chance of "jitter"
7878
# to avoid a stampeding herd when they all expire some day.
7979
EXTERNAL_LINK_CHECKER_MAX_AGE_DAYS: 7
80+
# If we're unable to connect or the server returns a 50x error,
81+
# treat it as a warning and not as a broken link.
82+
EXTERNAL_SERVER_ERRORS_AS_WARNINGS: true
8083
timeout-minutes: 30
8184
run: node .github/actions/rendered-content-link-checker.js
8285

.github/workflows/msft-create-translation-batch-pr.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ jobs:
5555
# language_dir: translations/ko-KR
5656
# language_repo: github/docs-internal.ko-kr
5757

58-
# - language: fr
59-
# language_dir: translations/fr-FR
60-
# language_repo: github/docs-internal.fr-fr
58+
- language: fr
59+
language_dir: translations/fr-FR
60+
language_repo: github/docs-internal.fr-fr
6161

6262
# - language: de
6363
# language_dir: translations/de-DE

.github/workflows/sync-search-elasticsearch.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
fail-fast: false
3737
matrix:
3838
# This needs to match the languages we support
39-
language: [en, ja, es, pt, cn, ru]
39+
language: [en, ja, es, pt, cn, ru, fr]
4040
steps:
4141
- if: ${{ env.FREEZE == 'true' }}
4242
run: |

components/context/MainContext.tsx

+19-4
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ type DataT = {
4040
version_was_deprecated: string
4141
version_will_be_deprecated: string
4242
deprecation_details: string
43-
isOldestReleaseDeprecated: boolean
43+
isOldestReleaseDeprecated?: boolean
4444
}
4545
policies: {
4646
translation: string
@@ -130,12 +130,27 @@ export const getMainContext = async (req: any, res: any): Promise<MainContextT>
130130
error: req.context.error ? req.context.error.toString() : '',
131131
data: {
132132
ui: req.context.site.data.ui,
133+
133134
reusables: {
134-
enterprise_deprecation: req.context.site.data.reusables.enterprise_deprecation,
135-
policies: req.context.site.data.reusables.policies,
135+
enterprise_deprecation: {
136+
version_was_deprecated: req.context.getDottedData(
137+
'reusables.enterprise_deprecation.version_was_deprecated'
138+
),
139+
version_will_be_deprecated: req.context.getDottedData(
140+
'reusables.enterprise_deprecation.version_will_be_deprecated'
141+
),
142+
deprecation_details: req.context.getDottedData(
143+
'reusables.enterprise_deprecation.deprecation_details'
144+
),
145+
},
146+
policies: {
147+
translation: req.context.getDottedData('reusables.policies.translation'),
148+
},
136149
},
137150
variables: {
138-
release_candidate: req.context.site.data.variables.release_candidate,
151+
release_candidate: {
152+
version: req.context.getDottedData('variables.release_candidate.version') || null,
153+
},
139154
},
140155
},
141156
currentCategory: req.context.currentCategory || '',

content/code-security/security-advisories/guidance-on-reporting-and-writing/privately-reporting-a-security-vulnerability.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Security researchers can privately report a security vulnerability to repository
4747
2. Fill in the advisory details form.
4848
{% tip %}
4949

50-
**Tip:** In this form, only the title and description are mandatory. (In the general draft security advisory form, which the repository maintainer initiates, specifying the ecosystem is also required.) However, we recommend security researchers provide as much information as possible on the form so that the maintainers can make an informed decision about the submitted report.
50+
**Tip:** In this form, only the title and description are mandatory. (In the general draft security advisory form, which the repository maintainer initiates, specifying the ecosystem is also required.) However, we recommend security researchers provide as much information as possible on the form so that the maintainers can make an informed decision about the submitted report. You can adopt the template used by our security researchers from the {% data variables.product.prodname_security %}, which is available on the [`github/securitylab` repository](https://github.com/github/securitylab/blob/main/docs/report-template.md)."
5151

5252
{% endtip %}
5353

content/get-started/quickstart/github-glossary.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ versions:
1313
---
1414
{% for glossary in glossaries %}
1515
### {{ glossary.term }}
16-
{{ glossary.description}}
16+
{{ glossary.description }}
1717
---
1818
{% endfor %}
1919

content/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/accessing-compliance-reports-for-your-organization.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ You can access {% data variables.product.company_short %}'s compliance reports i
2828

2929
{% data reusables.profile.access_org %}
3030
{% data reusables.profile.org_settings %}
31-
{% data reusables.organizations.security %}
32-
1. Under "Compliance reports", to the right of the report you want to access, click {% octicon "download" aria-label="The Download icon" %} **Download** or {% octicon "link-external" aria-label="The external link icon" %} **View**.
31+
{% data reusables.organizations.compliance %}
32+
1. To the right of the report you want to access, click {% octicon "download" aria-label="The Download icon" %} **Download** or {% octicon "link-external" aria-label="The external link icon" %} **View**.
3333

3434
{% data reusables.security.compliance-report-screenshot %}
3535

data/graphql/ghec/schema.docs.graphql

+21
Original file line numberDiff line numberDiff line change
@@ -26160,6 +26160,13 @@ type Organization implements Actor & MemberStatusable & Node & PackageOwner & Pr
2616026160
"""
2616126161
first: Int
2616226162

26163+
"""
26164+
Whether to include those events where this sponsorable acted as the sponsor.
26165+
Defaults to only including events where this sponsorable was the recipient
26166+
of a sponsorship.
26167+
"""
26168+
includeAsSponsor: Boolean = false
26169+
2616326170
"""
2616426171
Returns the last _n_ elements from the list.
2616526172
"""
@@ -44993,6 +45000,13 @@ interface Sponsorable {
4499345000
"""
4499445001
first: Int
4499545002

45003+
"""
45004+
Whether to include those events where this sponsorable acted as the sponsor.
45005+
Defaults to only including events where this sponsorable was the recipient
45006+
of a sponsorship.
45007+
"""
45008+
includeAsSponsor: Boolean = false
45009+
4499645010
"""
4499745011
Returns the last _n_ elements from the list.
4499845012
"""
@@ -53893,6 +53907,13 @@ type User implements Actor & Node & PackageOwner & ProfileOwner & ProjectNextOwn
5389353907
"""
5389453908
first: Int
5389553909

53910+
"""
53911+
Whether to include those events where this sponsorable acted as the sponsor.
53912+
Defaults to only including events where this sponsorable was the recipient
53913+
of a sponsorship.
53914+
"""
53915+
includeAsSponsor: Boolean = false
53916+
5389653917
"""
5389753918
Returns the last _n_ elements from the list.
5389853919
"""

data/graphql/schema.docs.graphql

+21
Original file line numberDiff line numberDiff line change
@@ -26160,6 +26160,13 @@ type Organization implements Actor & MemberStatusable & Node & PackageOwner & Pr
2616026160
"""
2616126161
first: Int
2616226162

26163+
"""
26164+
Whether to include those events where this sponsorable acted as the sponsor.
26165+
Defaults to only including events where this sponsorable was the recipient
26166+
of a sponsorship.
26167+
"""
26168+
includeAsSponsor: Boolean = false
26169+
2616326170
"""
2616426171
Returns the last _n_ elements from the list.
2616526172
"""
@@ -44993,6 +45000,13 @@ interface Sponsorable {
4499345000
"""
4499445001
first: Int
4499545002

45003+
"""
45004+
Whether to include those events where this sponsorable acted as the sponsor.
45005+
Defaults to only including events where this sponsorable was the recipient
45006+
of a sponsorship.
45007+
"""
45008+
includeAsSponsor: Boolean = false
45009+
4499645010
"""
4499745011
Returns the last _n_ elements from the list.
4499845012
"""
@@ -53893,6 +53907,13 @@ type User implements Actor & Node & PackageOwner & ProfileOwner & ProjectNextOwn
5389353907
"""
5389453908
first: Int
5389553909

53910+
"""
53911+
Whether to include those events where this sponsorable acted as the sponsor.
53912+
Defaults to only including events where this sponsorable was the recipient
53913+
of a sponsorship.
53914+
"""
53915+
includeAsSponsor: Boolean = false
53916+
5389653917
"""
5389753918
Returns the last _n_ elements from the list.
5389853919
"""

data/release-notes/enterprise-server/3-7/0.yml

+1
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,7 @@ sections:
285285
- |
286286
Users can write mathematical expressions using fenced code blocks with the `math` syntax in addition to the existing delimiters. `$$` is not required with this method. For more information, see "[Writing mathematical expressions](/get-started/writing-on-github/working-with-advanced-formatting/writing-mathematical-expressions)."
287287
288+
- **Note**: This feature is unavailable in GitHub Enterprise Server 3.7. The feature will be available in an upcoming release. [Updated: 2022-11-16]
288289
# https://github.com/github/releases/issues/2105
289290
- |
290291
Users can render maps directly in Markdown using fenced code blocks with the `geojson` or `topojson` syntax, and embed STL 3D renders using `stl` syntax. For more information, see "[Creating diagrams](/get-started/writing-on-github/working-with-advanced-formatting/creating-diagrams)."

data/reusables/dependabot/dependabot-alerts-dependency-scope.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
The table below summarizes whether dependency scope is supported for various ecosystems and manifests, that is, whether {% data variables.product.prodname_dependabot %} can identify if a dependency is used for development or production.
22

33
| **Language** | **Ecosystem** | **Manifest file** | **Dependency scope supported** |
4-
|:---|:---:|:---:|:---|
4+
|:---|:---:|:---:|:---|{% ifversion fpt or ghec or ghes > 3.7 %}
5+
| Dart | pub | pubspec.yaml ||
6+
| Dart | pub | pubspec.lock | ✔ |{% endif %}
57
| Go | Go modules | go.mod | No, defaults to runtime |
68
| Go | Go modules | go.sum | No, defaults to runtime |
79
| Java | Maven | pom.xml |`test` maps to development, else scope defaults to runtime |
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
1. In the "Security" section of the sidebar, click **{% octicon "checklist" aria-label="The checklist icon" %} Compliance**.

data/reusables/secret-scanning/partner-secret-list-private-repo.md

+6-2
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,11 @@ Azure | Azure Cache for Redis Access Key | azure_cache_for_redis_access_key{% en
2424
Azure | Azure CosmosDB Key Identifiable | azure_cosmosdb_key_identifiable{% endif %}
2525
Azure | Azure DevOps {% data variables.product.pat_generic_title_case %} | azure_devops_personal_access_token
2626
{%- ifversion fpt or ghec or ghes > 3.8 or ghae > 3.8 %}
27-
Azure | Azure ML Studio (classic) Web Service Key | azure_ml_studio_classic_web_service_key{% endif %}
27+
Azure | Azure ML Studio (classic) Web Service Key | azure_ml_studio_classic_web_service_key, azure_ml_web_service_classic_identifiable_key{% endif %}
2828
Azure | Azure SAS Token | azure_sas_token
29+
{%- ifversion fpt or ghec or ghes > 3.8 or ghae > 3.8 %}
30+
Azure | Azure Search Admin Key | azure_search_admin_key
31+
Azure | Azure Search Query Key | azure_search_query_key{% endif %}
2932
Azure | Azure Service Management Certificate | azure_management_certificate
3033
{%- ifversion ghes < 3.4 or ghae < 3.4 %}
3134
Azure | Azure SQL Connection String | azure_sql_connection_string{% endif %}
@@ -78,7 +81,8 @@ GoCardless | GoCardless Live Access Token | gocardless_live_access_token
7881
GoCardless | GoCardless Sandbox Access Token | gocardless_sandbox_access_token
7982
Google | Firebase Cloud Messaging Server Key | firebase_cloud_messaging_server_key
8083
Google | Google API Key | google_api_key
81-
Google | Google Cloud Private Key ID |
84+
{%- ifversion fpt or ghec or ghes > 3.5 or ghae > 3.5 %}
85+
Google | Google Cloud Private Key ID | google_cloud_private_key_id{% endif %}
8286
Google | Google Cloud Storage Service Account Access Key ID with Google Cloud Storage Access Key Secret | google_cloud_storage_service_account_access_key_id </br>google_cloud_storage_access_key_secret
8387
Google | Google Cloud Storage User Access Key ID with Google Cloud Storage Access Key Secret | google_cloud_storage_user_access_key_id </br>google_cloud_storage_access_key_secret
8488
{%- ifversion fpt or ghec or ghes > 3.3 or ghae > 3.3 %}

data/reusables/secret-scanning/partner-secret-list-public-repo.md

+2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ Azure | Azure CosmosDB Key Identifiable
1515
Azure | Azure DevOps {% data variables.product.pat_generic_title_case %}
1616
Azure | Azure ML Studio (classic) Web Service Key
1717
Azure | Azure SAS Token
18+
Azure | Azure Search Admin Key
19+
Azure | Azure Search Query Key
1820
Azure | Azure Service Management Certificate
1921
Azure | Azure SQL Connection String
2022
Azure | Azure Storage Account Key

data/reusables/secret-scanning/secret-list-private-push-protection.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ Azure | Azure Cache for Redis Access Key | azure_cache_for_redis_access_key
1515
Azure | Azure CosmosDB Key Identifiable | azure_cosmosdb_key_identifiable{% endif %}
1616
Azure | Azure DevOps {% data variables.product.pat_generic_title_case %} | azure_devops_personal_access_token
1717
{%- ifversion fpt or ghec or ghes > 3.8 or ghae > 3.8 %}
18-
Azure | Azure ML Studio (classic) Web Service Key | azure_ml_studio_classic_web_service_key{% endif %}
18+
Azure | Azure ML Studio (classic) Web Service Key | azure_ml_web_service_classic_identifiable_key{% endif %}
19+
{%- ifversion fpt or ghec or ghes > 3.8 or ghae > 3.8 %}
20+
Azure | Azure Search Admin Key | azure_search_admin_key
21+
Azure | Azure Search Query Key | azure_search_query_key{% endif %}
1922
{%- ifversion fpt or ghec or ghes > 3.6 or ghae > 3.6 %}
2023
Azure | Azure Storage Account Key | azure_storage_account_key{% endif %}
2124
Checkout.com | Checkout.com Production Secret Key | checkout_production_secret_key

0 commit comments

Comments
 (0)