Skip to content

Commit be35a83

Browse files
authored
Merge branch 'main' into patch-2
2 parents 12e558c + bb81f05 commit be35a83

5,516 files changed

Lines changed: 511359 additions & 64616 deletions

File tree

Some content is hidden

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

.github/ISSUE_TEMPLATE/improve-the-site.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Check to make sure someone hasn't already opened a similar issue: https://github
2222

2323
### What is the current behavior?
2424

25-
<!-- include links to articles where you're seeing a problem, screenshots, what browser you're using, etc. -->
25+
<!-- Include links to articles where you're seeing a problem, screenshots, what browser you're using, etc. -->
2626

2727
### What changes are you suggesting?
2828

.github/allowed-actions.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ module.exports = [
88
'actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f', //actions/checkout@v2.3.4
99
'actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9', //actions/script@v3.0.0
1010
'actions/labeler@5f867a63be70efff62b767459b009290364495eb', //actions/labeler@v2.2.0
11-
'actions/setup-node@56899e050abffc08c2b3b61f3ec6a79a9dc3223d', //actions/setup-node@v1.4.4
11+
'actions/setup-node@c46424eee26de4078d34105d3de3cc4992202b1e', //actions/setup-node@v2.1.4
1212
'actions/setup-ruby@5f29a1cd8dfebf420691c4c9a0e832e2fae5a526', //actions/setup-ruby@v1.1.2
1313
'actions/stale@af4072615903a8b031f986d25b1ae3bf45ec44d4', //actions/stale@v3.0.13
1414
'crowdin/github-action@fd9429dd63d6c0f8a8cb4b93ad8076990bd6e688',
15-
'crykn/copy_folder_to_another_repo_action@abc264e1c16eb3d7b1f7763bfdb0e1699ad43120',
15+
'crykn/copy_folder_to_another_repo_action@0282e8b9fef06de92ddcae9fe6cb44df6226646c',
1616
'cschleiden/actions-linter@43fd4e08e52ed40c0e2782dc2425694388851576',
1717
'dawidd6/action-delete-branch@47743101a121ad657031e6704086271ca81b1911',
1818
'docker://chinthakagodawita/autoupdate-action:v1',
@@ -21,7 +21,7 @@ module.exports = [
2121
'github/codeql-action/init@v1',
2222
'ianwalter/puppeteer@12728ddef82390d1ecd4732fb543f62177392fbb',
2323
'juliangruber/approve-pull-request-action@c530832d4d346c597332e20e03605aa94fa150a8',
24-
'juliangruber/find-pull-request-action@64d55773c959748ad30a4184f4dc102af1669f7b',
24+
'juliangruber/find-pull-request-action@2fc55e82a6d5d36fe1e7f1848f7e64fd02d99de9',
2525
'juliangruber/read-file-action@e0a316da496006ffd19142f0fd594a1783f3b512',
2626
'lee-dohm/close-matching-issues@22002609b2555fe18f52b8e2e7c07cbf5529e8a8',
2727
'pascalgn/automerge-action@c9bd182',
@@ -33,7 +33,7 @@ module.exports = [
3333
'repo-sync/github-sync@3832fe8e2be32372e1b3970bbae8e7079edeec88',
3434
'repo-sync/pull-request@33777245b1aace1a58c87a29c90321aa7a74bd7d',
3535
'someimportantcompany/github-actions-slack-message@0b470c14b39da4260ed9e3f9a4f1298a74ccdefd',
36-
'tjenkinson/gh-action-auto-merge-dependency-updates@cee2ac0',
36+
'tjenkinson/gh-action-auto-merge-dependency-updates@4d7756c04d9d999c5968697a621b81c47f533d61',
3737
'EndBug/add-and-commit@9358097a71ad9fb9e2f9624c6098c89193d83575',
3838
'dorny/paths-filter@eb75a1edc117d3756a18ef89958ee59f9500ba58'
3939
]

.github/workflows/automerge-dependencies.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
if: github.repository == 'github/docs-internal' || github.repository == 'github/docs'
1818
runs-on: ubuntu-latest
1919
steps:
20-
- uses: tjenkinson/gh-action-auto-merge-dependency-updates@cee2ac0
20+
- uses: tjenkinson/gh-action-auto-merge-dependency-updates@4d7756c04d9d999c5968697a621b81c47f533d61
2121
with:
2222
repo-token: ${{ secrets.GITHUB_TOKEN }}
2323
allowed-actors: dependabot[bot]
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: Check for Spammy Issues
2+
on:
3+
issues:
4+
types: [opened]
5+
jobs:
6+
spammy-title-check:
7+
name: Remove issues with spammy titles
8+
if: github.repository == 'github/docs'
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
12+
with:
13+
github-token: ${{ secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES }}
14+
script: |
15+
16+
const issue = context.payload.issue
17+
const owner = 'github'
18+
const repo = 'docs'
19+
20+
const titleWordCount = issue.title.trim().split(' ').length
21+
const titleWordCountMin = 2
22+
23+
try {
24+
await github.teams.getMembershipForUserInOrg({
25+
org: 'github',
26+
team_slug: 'employees',
27+
username: context.payload.sender.login,
28+
});
29+
30+
// Do not perform this workflow with GitHub employees. This return
31+
// statement only gets hit if the user is a GitHub employee
32+
return
33+
} catch(err) {
34+
// An error will be thrown if the user is not a GitHub employee
35+
// If a user is not a GitHub employee, we should check to see if title has at least the minimum required number of words in it and if it does, we can exit the workflow
36+
37+
if(titleWordCount > titleWordCountMin) {
38+
return
39+
}
40+
}
41+
42+
//
43+
// Assuming the user is not a GitHub employee and the issue title
44+
// has the minimum number of words required, proceed.
45+
//
46+
47+
// Close the issue and add the invalid label
48+
await github.issues.update({
49+
owner: owner,
50+
repo: repo,
51+
issue_number: issue.number,
52+
labels: ['invalid'],
53+
state: 'closed'
54+
});
55+
56+
// Comment on the issue
57+
await github.issues.createComment({
58+
owner: owner,
59+
repo: repo,
60+
issue_number: issue.number,
61+
body: "This issue appears to have been opened accidentally. I'm going to close it now, but feel free to open a new issue or ask any questions in [discussions](https://github.com/github/docs/discussions)!"
62+
});

.github/workflows/dry-run-sync-algolia-search-indices.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
steps:
1212
- name: checkout
1313
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
14-
- uses: actions/setup-node@56899e050abffc08c2b3b61f3ec6a79a9dc3223d
14+
- uses: actions/setup-node@c46424eee26de4078d34105d3de3cc4992202b1e
1515
with:
1616
node-version: 14.x
1717
- name: cache node modules
@@ -21,8 +21,10 @@ jobs:
2121
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
2222
restore-keys: |
2323
${{ runner.os }}-node-
24-
- name: npm ci
24+
- name: Install dependencies
2525
run: npm ci
26+
- name: Run build scripts
27+
run: npm run build
2628
- name: (Dry run) sync indices
2729
env:
2830
ALGOLIA_APPLICATION_ID: ${{ secrets.ALGOLIA_APPLICATION_ID }}

.github/workflows/js-lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
1818

1919
- name: Setup node
20-
uses: actions/setup-node@56899e050abffc08c2b3b61f3ec6a79a9dc3223d
20+
uses: actions/setup-node@c46424eee26de4078d34105d3de3cc4992202b1e
2121
with:
2222
node-version: 14.x
2323

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: 'Link Checker: Dotcom'
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
7+
jobs:
8+
see_if_should_skip:
9+
continue-on-error: true
10+
runs-on: ubuntu-latest
11+
# Map a step output to a job output
12+
outputs:
13+
should_skip: ${{ steps.skip_check.outputs.should_skip }}
14+
steps:
15+
- id: skip_check
16+
uses: fkirc/skip-duplicate-actions@36feb0d8d062137530c2e00bd278d138fe191289
17+
with:
18+
cancel_others: 'false'
19+
github_token: ${{ github.token }}
20+
paths: '[".github/workflows/link-check-dotcom.yml", "assets/**", "content/**", "data/**", "includes/**", "javascripts/**", "jest-puppeteer.config.js", "jest.config.js", "layouts/**", "lib/**", "middleware/**", "package-lock.json", "package.json", "server.js", "translations/**", "webpack.config.js"]'
21+
build:
22+
needs: see_if_should_skip
23+
runs-on: ${{ fromJSON('["ubuntu-latest", "self-hosted"]')[github.repository == 'github/docs-internal'] }}
24+
steps:
25+
# Each of these ifs needs to be repeated at each step to make sure the required check still runs
26+
# Even if if doesn't do anything
27+
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
28+
name: Checkout
29+
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
30+
31+
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
32+
name: Setup node
33+
uses: actions/setup-node@c46424eee26de4078d34105d3de3cc4992202b1e
34+
with:
35+
node-version: 14.x
36+
37+
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
38+
name: Install
39+
run: npm ci
40+
41+
## TODO
42+
# - if: ${{ github.repository == 'github/docs-internal' && needs.see_if_should_skip.outputs.should_skip != 'true' }}
43+
# name: Clone early access
44+
# run: npm run heroku-postbuild
45+
# env:
46+
# DOCUBOT_REPO_PAT: ${{ secrets.DOCUBOT_REPO_PAT }}
47+
# GIT_BRANCH: ${{ github.ref }}
48+
49+
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
50+
name: Build
51+
run: npm run build
52+
53+
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
54+
name: 'Link check: Dotcom'
55+
env:
56+
DOCS_VERSION: 'dotcom'
57+
run: npm run link-check
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: 'Link Checker: GitHub AE'
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
7+
jobs:
8+
see_if_should_skip:
9+
continue-on-error: true
10+
runs-on: ubuntu-latest
11+
# Map a step output to a job output
12+
outputs:
13+
should_skip: ${{ steps.skip_check.outputs.should_skip }}
14+
steps:
15+
- id: skip_check
16+
uses: fkirc/skip-duplicate-actions@36feb0d8d062137530c2e00bd278d138fe191289
17+
with:
18+
cancel_others: 'false'
19+
github_token: ${{ github.token }}
20+
paths: '[".github/workflows/link-check-ghae.yml", "assets/**", "content/**", "data/**", "includes/**", "javascripts/**", "jest-puppeteer.config.js", "jest.config.js", "layouts/**", "lib/**", "middleware/**", "package-lock.json", "package.json", "server.js", "translations/**", "webpack.config.js"]'
21+
build:
22+
needs: see_if_should_skip
23+
runs-on: ${{ fromJSON('["ubuntu-latest", "self-hosted"]')[github.repository == 'github/docs-internal'] }}
24+
steps:
25+
# Each of these ifs needs to be repeated at each step to make sure the required check still runs
26+
# Even if if doesn't do anything
27+
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
28+
name: Checkout
29+
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
30+
31+
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
32+
name: Setup node
33+
uses: actions/setup-node@c46424eee26de4078d34105d3de3cc4992202b1e
34+
with:
35+
node-version: 14.x
36+
37+
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
38+
name: Install
39+
run: npm ci
40+
41+
## TODO
42+
# - if: ${{ github.repository == 'github/docs-internal' && needs.see_if_should_skip.outputs.should_skip != 'true' }}
43+
# name: Clone early access
44+
# run: npm run heroku-postbuild
45+
# env:
46+
# DOCUBOT_REPO_PAT: ${{ secrets.DOCUBOT_REPO_PAT }}
47+
# GIT_BRANCH: ${{ github.ref }}
48+
49+
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
50+
name: Build
51+
run: npm run build
52+
53+
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
54+
name: 'Link check: GitHub AE'
55+
env:
56+
DOCS_VERSION: 'github-ae'
57+
run: npm run link-check
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: 'Link Checker: Enterprise Server'
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
7+
jobs:
8+
see_if_should_skip:
9+
continue-on-error: true
10+
runs-on: ubuntu-latest
11+
# Map a step output to a job output
12+
outputs:
13+
should_skip: ${{ steps.skip_check.outputs.should_skip }}
14+
steps:
15+
- id: skip_check
16+
uses: fkirc/skip-duplicate-actions@36feb0d8d062137530c2e00bd278d138fe191289
17+
with:
18+
cancel_others: 'false'
19+
github_token: ${{ github.token }}
20+
paths: '[".github/workflows/link-check-ghes.yml", "assets/**", "content/**", "data/**", "includes/**", "javascripts/**", "jest-puppeteer.config.js", "jest.config.js", "layouts/**", "lib/**", "middleware/**", "package-lock.json", "package.json", "server.js", "translations/**", "webpack.config.js"]'
21+
build:
22+
needs: see_if_should_skip
23+
runs-on: ${{ fromJSON('["ubuntu-latest", "self-hosted"]')[github.repository == 'github/docs-internal'] }}
24+
steps:
25+
# Each of these ifs needs to be repeated at each step to make sure the required check still runs
26+
# Even if if doesn't do anything
27+
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
28+
name: Checkout
29+
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
30+
31+
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
32+
name: Setup node
33+
uses: actions/setup-node@c46424eee26de4078d34105d3de3cc4992202b1e
34+
with:
35+
node-version: 14.x
36+
37+
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
38+
name: Install
39+
run: npm ci
40+
41+
## TODO
42+
# - if: ${{ github.repository == 'github/docs-internal' && needs.see_if_should_skip.outputs.should_skip != 'true' }}
43+
# name: Clone early access
44+
# run: npm run heroku-postbuild
45+
# env:
46+
# DOCUBOT_REPO_PAT: ${{ secrets.DOCUBOT_REPO_PAT }}
47+
# GIT_BRANCH: ${{ github.ref }}
48+
49+
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
50+
name: Build
51+
run: npm run build
52+
53+
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
54+
name: 'Link check: Enterprise Server'
55+
env:
56+
DOCS_VERSION: 'enterprise-server'
57+
run: npm run link-check

.github/workflows/repo-sync.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,13 @@ jobs:
5858
github_token: ${{ secrets.OCTOMERGER_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }}
5959

6060
- name: Find pull request
61-
uses: juliangruber/find-pull-request-action@64d55773c959748ad30a4184f4dc102af1669f7b
61+
uses: juliangruber/find-pull-request-action@2fc55e82a6d5d36fe1e7f1848f7e64fd02d99de9
6262
id: find-pull-request
6363
with:
6464
github-token: ${{ secrets.GITHUB_TOKEN }}
6565
branch: repo-sync
6666
base: main
67+
author: Octomerger
6768

6869
- name: Approve pull request
6970
if: ${{ steps.find-pull-request.outputs.number }}

0 commit comments

Comments
 (0)