Skip to content

Commit 49ae604

Browse files
authored
Merge branch 'main' into patch-2
2 parents 6723a79 + e2bfb06 commit 49ae604

File tree

227 files changed

+1822
-3334
lines changed

Some content is hidden

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

227 files changed

+1822
-3334
lines changed

.babelrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"presets": ["next/babel"],
3-
"plugins": [["styled-components", { "ssr": true }]]
3+
"plugins": [["styled-components", { "ssr": true }], "@babel/plugin-syntax-top-level-await"]
44
}

.eslintrc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ module.exports = {
1111
ecmaVersion: 11,
1212
requireConfigFile: 'false',
1313
babelOptions: { configFile: './.babelrc' },
14+
sourceType: 'module',
1415
},
1516
rules: {
1617
'import/no-extraneous-dependencies': ['error', { packageDir: '.' }],

.github/allowed-actions.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ export default [
2323
'juliangruber/approve-pull-request-action@c530832d4d346c597332e20e03605aa94fa150a8',
2424
'juliangruber/find-pull-request-action@db875662766249c049b2dcd85293892d61cb0b51', // v1.5.0
2525
'juliangruber/read-file-action@e0a316da496006ffd19142f0fd594a1783f3b512',
26-
'lee-dohm/close-matching-issues@22002609b2555fe18f52b8e2e7c07cbf5529e8a8',
2726
'lee-dohm/no-response@9bb0a4b5e6a45046f00353d5de7d90fb8bd773bb',
2827
'pascalgn/automerge-action@c9bd1823770819dc8fb8a5db2d11a3a95fbe9b07', // v0.12.0
2928
'peter-evans/create-issue-from-file@b4f9ee0a9d4abbfc6986601d9b1a4f8f8e74c77e',

.github/workflows/check-all-english-links.yml

Lines changed: 52 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ jobs:
1414
name: Check all links
1515
if: github.repository == 'github/docs-internal'
1616
runs-on: ubuntu-latest
17+
env:
18+
GITHUB_TOKEN: ${{ secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES }}
19+
REPORT_AUTHOR: docubot
20+
REPORT_LABEL: broken link report
21+
REPORT_REPOSITORY: github/docs-content
1722
steps:
1823
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
1924
- name: npm ci
@@ -27,27 +32,58 @@ jobs:
2732
name: Get title for issue
2833
id: check
2934
run: echo "::set-output name=title::$(head -1 broken_links.md)"
30-
- if: ${{ failure() }}
31-
name: Close previous report
32-
uses: lee-dohm/close-matching-issues@22002609b2555fe18f52b8e2e7c07cbf5529e8a8
33-
with:
34-
query: 'label:"broken link report"'
35-
token: ${{ secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES }}
3635
- if: ${{ failure() }}
3736
name: Create issue from file
3837
id: broken-link-report
3938
uses: peter-evans/create-issue-from-file@b4f9ee0a9d4abbfc6986601d9b1a4f8f8e74c77e
4039
with:
41-
token: ${{ secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES }}
40+
token: ${{ env.GITHUB_TOKEN }}
41+
4242
title: ${{ steps.check.outputs.title }}
4343
content-filepath: ./broken_links.md
44-
repository: github/docs-content
45-
labels: broken link report
44+
repository: ${{ env.REPORT_REPOSITORY }}
45+
labels: ${{ env.REPORT_LABEL }}
4646
- if: ${{ failure() }}
47-
name: Add comment to issue
48-
uses: peter-evans/create-or-update-comment@5221bf4aa615e5c6e95bb142f9673a9c791be2cd
49-
with:
50-
body: |
51-
cc @github/docs-content
52-
issue-number: ${{ steps.broken-link-report.outputs.issue-number }}
53-
token: ${{ secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES }}
47+
name: Close and/or comment on old issues
48+
env:
49+
NEW_REPORT_URL: 'https://github.com/${{ env.REPORT_REPOSITORY }}/issues/${{ steps.broken-link-report.outputs.issue-number }}'
50+
run: |
51+
gh alias set list-reports "issue list \
52+
--repo ${{ env.REPORT_REPOSITORY }} \
53+
--author ${{ env.REPORT_AUTHOR }} \
54+
--label '${{ env.REPORT_LABEL }}'"
55+
56+
# Link to the previous report from the new report that triggered this
57+
# workflow run.
58+
59+
for issue_url in $(gh list-reports \
60+
--state all \
61+
--limit 2 \
62+
--json url \
63+
--jq '.[].url' | grep -v ${{ env.NEW_REPORT_URL }}); do
64+
gh issue comment ${{ env.NEW_REPORT_URL }} --body "⬅️ [Previous report]($issue_url)"
65+
done
66+
67+
# Link to the newer report from any older report that is still open,
68+
# then close the older report.
69+
70+
for issue_url in $(gh list-reports \
71+
--search 'no:assignee' \
72+
--json url \
73+
--jq '.[].url'); do
74+
if [ "$issue_url" != "${{ env.NEW_REPORT_URL }}" ]; then
75+
gh issue comment $issue_url --body "➡️ [Newer report](${{ env.NEW_REPORT_URL }})"
76+
gh issue close $issue_url
77+
fi
78+
done
79+
80+
# If an old report is open and assigned to someone, link to the newer
81+
# report without closing the old report.
82+
83+
for issue_url in $(gh list-reports \
84+
--json assignees,url \
85+
--jq '.[] | select (.assignees != []) | .url'); do
86+
if [ "$issue_url" != "${{ env.NEW_REPORT_URL }}" ]; then
87+
gh issue comment $issue_url --body "➡️ [Newer report](${{ env.NEW_REPORT_URL }})"
88+
fi
89+
done

.github/workflows/openapi-schema-check.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,17 @@ on:
1414
jobs:
1515
check-schema-versions:
1616
if: ${{ github.repository == 'github/docs-internal' }}
17-
runs-on: ubuntu-latest
17+
runs-on: ${{ fromJson('["ubuntu-latest", "self-hosted"]')[github.repository == 'github/docs-internal'] }}
1818
steps:
1919
- name: Checkout repository code
2020
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
2121

22+
- name: Setup node
23+
uses: actions/setup-node@38d90ce44d5275ad62cc48384b3d8a58c500bb5f
24+
with:
25+
node-version: 16.x
26+
cache: npm
27+
2228
- name: Install dependencies
2329
run: npm ci
2430

Loading
Loading
Loading
129 KB
Loading
Loading

0 commit comments

Comments
 (0)