Skip to content

Commit 18a05d5

Browse files
authored
Merge branch 'main' into mm-cs-port-visibility
2 parents a5beffd + 9aa82f2 commit 18a05d5

File tree

1,212 files changed

+20511
-18280
lines changed

Some content is hidden

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

1,212 files changed

+20511
-18280
lines changed

Diff for: .github/workflows/needs-sme-stale-check.yaml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Stale check for issues or PRs with "needs SME" label
2+
3+
# **What it does**: Provides stale checks on issues/PRs that need SME(subject matter expert) review on open source docs repo.
4+
# **Why we have it**: In the open repo, we want we want frequent checks on issues/PRs that are waiting on SME review.
5+
# **Who does it impact**: Anyone working in the open repo.
6+
7+
on:
8+
schedule:
9+
- cron: '40 20 * * *' # Run each day at 20:40 UTC / 12:40 PST
10+
11+
permissions:
12+
issues: write
13+
pull-requests: write
14+
15+
jobs:
16+
stale_needs-sme:
17+
if: ${{ github.repository == 'github/docs'' }}
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
- uses: actions/stale@7fb802b3079a276cf3c7e6ba9aa003c665b3f838
22+
with:
23+
only-labels: needs SME
24+
remove-stale-when-updated: true
25+
days-before-stale: 7 # adds stale label if no activity for 7 days
26+
stale-issue-message: 'This is a gentle bump for the docs team that this issue is waiting for technical review.'
27+
stale-issue-label: SME stale
28+
days-before-issue-close: -1 # never close
29+
stale-pr-message: 'This is a gentle bump for the docs team that this PR is waiting for technical review.'
30+
stale-pr-label: SME stale
31+
days-before-pr-close: -1 # never close

Diff for: .github/workflows/needs-sme-workflow.yml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Comment on adding "needs SME" label
2+
3+
# **What it does**: Comment on issues and pull requests when a "needs SME" label is added. SME = subject matter expert.
4+
# **Why we have it**: We want to manage our queue of issues and pull requests that need sme review.
5+
# **Who does it impact**: Everyone that works on docs or docs-internal.
6+
7+
on:
8+
issues:
9+
types: [labeled]
10+
pull_request_target:
11+
types: [labeled]
12+
13+
permissions:
14+
issues: write
15+
pull-requests: write
16+
17+
jobs:
18+
add-comment:
19+
if: ${{ github.repository == 'github/docs' && (github.event.label.name == 'needs SME' && github.event_name == 'issues' || github.event_name == 'pull_request_target') }}
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: peter-evans/create-or-update-comment@a35cf36e5301d70b76f316e867e7788a55a31dae
23+
with:
24+
issue-number: ${{ github.event.issue.number }}
25+
body: |
26+
Thanks for opening an issue! We've triaged this issue for technical review by a subject matter expert :eyes:
27+
- uses: peter-evans/create-or-update-comment@a35cf36e5301d70b76f316e867e7788a55a31dae
28+
with:
29+
issue-number: ${{ github.event.pull_request_target.number }}
30+
body: |
31+
Thanks for opening a pull request! We've triaged this issue for technical review by a subject matter expert :eyes:

Diff for: .github/workflows/orphaned-assets-check.yml

+35-5
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,24 @@ name: 'Orphaned assets check'
55
# **Who does it impact**: Docs content.
66

77
on:
8-
pull_request:
9-
push:
10-
branches:
11-
- gh-readonly-queue/main/**
8+
workflow_dispatch:
9+
schedule:
10+
- cron: '13 10 * * *' # Once a day at 10:13 UTC
1211

1312
permissions:
1413
contents: read
1514

1615
jobs:
1716
orphaned-assets-check:
17+
if: ${{ github.repository == 'github/docs-internal' }}
1818
runs-on: ubuntu-latest
1919
steps:
2020
- name: Checkout
2121
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
22+
with:
23+
# Using a PAT is necessary so that the new commit will trigger the
24+
# CI in the PR. (Events from GITHUB_TOKEN don't trigger new workflows.)
25+
token: ${{ secrets.DOCUBOT_REPO_PAT }}
2226

2327
- name: Setup node
2428
uses: actions/setup-node@1f8c6b94b26d0feae1e387ca63ccbdc44d27b561
@@ -30,4 +34,30 @@ jobs:
3034
run: npm ci
3135

3236
- name: Check for orphaned assets
33-
run: ./script/find-orphaned-assets.mjs --verbose --exit
37+
env:
38+
# Needed for gh
39+
GITHUB_TOKEN: ${{ secrets.DOCUBOT_REPO_PAT }}
40+
run: |
41+
set -e
42+
43+
./script/find-orphaned-assets.mjs | xargs git rm
44+
45+
# If nothing to commit, exit now. It's fine. No orphans.
46+
git status | grep 'nothing to commit' && exit 0
47+
48+
# Replicated from the translation pipeline PR-maker Action
49+
git config --global user.name "docubot"
50+
git config --global user.email "[email protected]"
51+
52+
date=$(date '+%Y-%m-%d-%H-%M')
53+
branchname=orphaned-assets-$date-$GITHUB_RUN_ID
54+
55+
git checkout -b $branchname
56+
git commit -m "Delete orphaned assets $date"
57+
git push origin $branchname
58+
59+
gh pr create \
60+
--title "Delete orphaned assets ($date)" \
61+
--body "Found with the find-orphaned-assets.mjs script" \
62+
--repo github/docs-internal \
63+
--label docs-content-fr

Diff for: CONTRIBUTING.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ Click **Make a contribution** at the bottom of any docs page to make small chang
4242

4343
<img src="./assets/images/contribution_cta.png" width="300" height="150" />
4444

45+
#### Make changes in a codespace
46+
47+
For more information about using a codespace for working on GitHub documentation, see "[Working in a codespace](https://github.com/github/docs/blob/main/contributing/codespace.md)."
48+
4549
#### Make changes locally
4650

4751
1. [Install Git LFS](https://docs.github.com/en/github/managing-large-files/versioning-large-files/installing-git-large-file-storage).
@@ -54,9 +58,6 @@ Click **Make a contribution** at the bottom of any docs page to make small chang
5458
- Using the command line:
5559
- [Fork the repo](https://docs.github.com/en/github/getting-started-with-github/fork-a-repo#fork-an-example-repository) so that you can make your changes without affecting the original project until you're ready to merge them.
5660

57-
- GitHub Codespaces:
58-
- [Fork, edit, and preview](https://docs.github.com/en/free-pro-team@latest/github/developing-online-with-codespaces/creating-a-codespace) using [GitHub Codespaces](https://github.com/features/codespaces) without having to install and run the project locally.
59-
6061
3. Install or update to **Node.js v16**. For more information, see [the development guide](contributing/development.md).
6162

6263
4. Create a working branch and start with your changes!
-13.6 KB
Loading

Diff for: assets/images/help/billing/pay-now-button.png

28 KB
Loading

Diff for: assets/images/help/billing/payment-summary-edit.png

-7.88 KB
Loading

Diff for: assets/images/help/billing/payment-summary.png

-6.76 KB
Loading

Diff for: assets/images/help/issues/column-chart-example.png

47.8 KB
Loading
Loading
14.7 KB
Loading
40.3 KB
Loading
-17.8 KB
Loading
-4.92 KB
Loading
14.9 KB
Loading
-18.8 KB
Binary file not shown.
-50.1 KB
Binary file not shown.
-56 KB
Binary file not shown.

Diff for: assets/images/help/repository/artifact-drop-down.png

-50.4 KB
Binary file not shown.

Diff for: assets/images/help/repository/cancel-check-suite.png

-30.7 KB
Binary file not shown.
Loading
-66.1 KB
Binary file not shown.
-21.3 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
39.7 KB
Loading
Loading
Loading
65.7 KB
Loading

Diff for: components/context/ProductLandingContext.tsx

+2-12
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,7 @@ export type ProductLandingContextT = {
3838
intro: string
3939
beta_product: boolean
4040
product: Product
41-
introLinks: {
42-
quickstart?: string
43-
reference?: string
44-
overview?: string
45-
} | null
41+
introLinks: Record<string, string> | null
4642
product_video?: string
4743
featuredLinks: Record<string, Array<FeaturedLink>>
4844
productCodeExamples: Array<CodeExample>
@@ -128,13 +124,7 @@ export const getProductLandingContextFromRequest = (req: any): ProductLandingCon
128124
})
129125
),
130126

131-
introLinks: page.introLinks
132-
? {
133-
quickstart: page.introLinks.quickstart,
134-
reference: page.introLinks.reference,
135-
overview: page.introLinks.overview,
136-
}
137-
: null,
127+
introLinks: page.introLinks || null,
138128

139129
featuredLinks: getFeaturedLinksFromReq(req),
140130

Diff for: components/landing/LandingHero.tsx

+22-9
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import { useEffect, useState } from 'react'
22
import cx from 'classnames'
33
import { useRouter } from 'next/router'
4-
import { useMainContext } from 'components/context/MainContext'
4+
import { LinkExternalIcon } from '@primer/octicons-react'
55

6+
import { useMainContext } from 'components/context/MainContext'
67
import { Link } from 'components/Link'
78
import { useProductLandingContext } from 'components/context/ProductLandingContext'
89
import { useTranslation } from 'components/hooks/useTranslation'
@@ -46,7 +47,7 @@ export const LandingHero = () => {
4647
href={link}
4748
className={cx('btn btn-large f4 mt-3 mr-3 ', i === 0 && 'btn-primary')}
4849
>
49-
{t(key)}
50+
{t(key) || key}
5051
</FullLink>
5152
)
5253
})}
@@ -72,7 +73,8 @@ export const LandingHero = () => {
7273
)
7374
}
7475

75-
// Fully Qualified Link - it includes the version and locale in the path
76+
// Fully Qualified Link - it includes the version and locale in the path if
77+
// the href is not an external link.
7678
type Props = {
7779
href: string
7880
children: React.ReactNode
@@ -81,13 +83,24 @@ type Props = {
8183
export const FullLink = ({ href, children, className }: Props) => {
8284
const router = useRouter()
8385
const { currentVersion } = useVersion()
84-
const locale = router.locale || 'en'
85-
const fullyQualifiedHref = `/${locale}${
86-
currentVersion !== 'free-pro-team@latest' ? `/${currentVersion}` : ''
87-
}${href}`
86+
87+
const isExternal = href.startsWith('https')
88+
let linkHref = href
89+
if (!isExternal) {
90+
const locale = router.locale || 'en'
91+
linkHref = `/${locale}${
92+
currentVersion !== 'free-pro-team@latest' ? `/${currentVersion}` : ''
93+
}${href}`
94+
}
95+
8896
return (
89-
<Link href={fullyQualifiedHref} className={className}>
90-
{children}
97+
<Link href={linkHref} className={className}>
98+
{children}{' '}
99+
{isExternal && (
100+
<span className="ml-1">
101+
<LinkExternalIcon size="small" />
102+
</span>
103+
)}
91104
</Link>
92105
)
93106
}

Diff for: components/playground/content/actions/guides/building-and-testing-nodejs-or-python/nodejs.tsx

+20-20
Original file line numberDiff line numberDiff line change
@@ -242,9 +242,9 @@ const article: PlaygroundArticleT = {
242242
node-version: [10.x, 12.x, 14.x, 15.x]
243243
244244
steps:
245-
- uses: actions/checkout@v2
245+
- uses: actions/checkout@v3
246246
- name: Use Node.js \${{ matrix.node-version }}
247-
uses: actions/setup-node@v2
247+
uses: actions/setup-node@v3
248248
with:
249249
node-version: \${{ matrix.node-version }}
250250
- name: Install dependencies
@@ -275,9 +275,9 @@ const article: PlaygroundArticleT = {
275275
node-version: [8.16.2, 10.17.0]
276276
277277
steps:
278-
- uses: actions/checkout@v2
278+
- uses: actions/checkout@v3
279279
- name: Use Node.js \${{ matrix.node-version }}
280-
uses: actions/setup-node@v2
280+
uses: actions/setup-node@v3
281281
with:
282282
node-version: \${{ matrix.node-version }}
283283
- name: Install dependencies
@@ -304,9 +304,9 @@ const article: PlaygroundArticleT = {
304304
runs-on: ubuntu-latest
305305
306306
steps:
307-
- uses: actions/checkout@v2
307+
- uses: actions/checkout@v3
308308
- name: Use Node.js
309-
uses: actions/setup-node@v1
309+
uses: actions/setup-node@v3
310310
with:
311311
node-version: '12.x'
312312
- name: Install dependencies
@@ -333,9 +333,9 @@ const article: PlaygroundArticleT = {
333333
runs-on: ubuntu-latest
334334
335335
steps:
336-
- uses: actions/checkout@v2
336+
- uses: actions/checkout@v3
337337
- name: Use Node.js
338-
uses: actions/setup-node@v1
338+
uses: actions/setup-node@v3
339339
with:
340340
node-version: '12.x'
341341
- name: Install dependencies
@@ -362,9 +362,9 @@ const article: PlaygroundArticleT = {
362362
runs-on: ubuntu-latest
363363
364364
steps:
365-
- uses: actions/checkout@v2
365+
- uses: actions/checkout@v3
366366
- name: Use Node.js
367-
uses: actions/setup-node@v1
367+
uses: actions/setup-node@v3
368368
with:
369369
node-version: '12.x'
370370
- name: Install dependencies
@@ -391,9 +391,9 @@ const article: PlaygroundArticleT = {
391391
runs-on: ubuntu-latest
392392
393393
steps:
394-
- uses: actions/checkout@v2
394+
- uses: actions/checkout@v3
395395
- name: Use Node.js
396-
uses: actions/setup-node@v1
396+
uses: actions/setup-node@v3
397397
with:
398398
node-version: '12.x'
399399
- name: Install dependencies
@@ -420,9 +420,9 @@ const article: PlaygroundArticleT = {
420420
runs-on: ubuntu-latest
421421
422422
steps:
423-
- uses: actions/checkout@v2
423+
- uses: actions/checkout@v3
424424
- name: Use Node.js
425-
uses: actions/setup-node@v1
425+
uses: actions/setup-node@v3
426426
with:
427427
node-version: '12.x'
428428
- name: Install dependencies
@@ -450,9 +450,9 @@ const article: PlaygroundArticleT = {
450450
runs-on: ubuntu-latest
451451
452452
steps:
453-
- uses: actions/checkout@v2
453+
- uses: actions/checkout@v3
454454
- name: Use Node.js
455-
uses: actions/setup-node@v1
455+
uses: actions/setup-node@v3
456456
with:
457457
always-auth: true
458458
node-version: '12.x'
@@ -492,9 +492,9 @@ const article: PlaygroundArticleT = {
492492
runs-on: ubuntu-latest
493493
494494
steps:
495-
- uses: actions/checkout@v2
495+
- uses: actions/checkout@v3
496496
- name: Use Node.js
497-
uses: actions/setup-node@v1
497+
uses: actions/setup-node@v3
498498
with:
499499
node-version: '12.x'
500500
cache: 'npm'
@@ -520,9 +520,9 @@ const article: PlaygroundArticleT = {
520520
runs-on: ubuntu-latest
521521
522522
steps:
523-
- uses: actions/checkout@v2
523+
- uses: actions/checkout@v3
524524
- name: Use Node.js
525-
uses: actions/setup-node@v1
525+
uses: actions/setup-node@v3
526526
with:
527527
node-version: '12.x'
528528
- run: npm install

0 commit comments

Comments
 (0)