Skip to content

Commit 59c8c8b

Browse files
author
Martin Lopes
authored
Merge branch 'main' into patch-1
2 parents 4d36776 + 7b99fd0 commit 59c8c8b

File tree

11,240 files changed

+979542
-194429
lines changed

Some content is hidden

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

11,240 files changed

+979542
-194429
lines changed

.eslintrc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ module.exports = {
1414
ecmaVersion: 11
1515
},
1616
rules: {
17+
'import/no-extraneous-dependencies': ['error']
1718
},
1819
overrides: [
1920
{

.github/ISSUE_COMMENT_TEMPLATE/quick-status.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ body:
1414
value: 'Status: YELLOW'
1515
- label: "RED \U0001F534 (BLOCKED)"
1616
value: 'Status: RED'
17+
- label: "BLACK ⚫️ (We shipped it \U0001F389)"
18+
value: 'Status: BLACK'
1719
- type: textarea
1820
attributes:
1921
label: Update Summary

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,11 @@ Thanks again!
2525
- [ ] I have reviewed my changes in staging. (look for the **deploy-to-heroku** link in your pull request, then click **View deployment**)
2626
- [ ] For content changes, I have reviewed the [localization checklist](https://github.com/github/docs/blob/main/contributing/localization-checklist.md)
2727
- [ ] For content changes, I have reviewed the [Content style guide for GitHub Docs](https://github.com/github/docs/blob/main/contributing/content-style-guide.md).
28+
29+
### Writer impact (This section is for GitHub staff members only):
30+
31+
- [ ] This pull request impacts the contribution experience
32+
- [ ] I have added the 'writer impact' label
33+
- [ ] I have added a description and/or a video demo of the changes below (eg. a "before and after video")
34+
35+
<!-- Description of the writer impact here -->

.github/allowed-actions.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
// can be added it this list.
55

66
module.exports = [
7-
"actions/cache@0781355a23dac32fd3bac414512f4b903437991a", //actions/cache@v2.1.3
8-
"actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f", //actions/checkout@v2.3.4
9-
"actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9", //actions/script@v3.0.0
10-
"actions/labeler@5f867a63be70efff62b767459b009290364495eb", //actions/labeler@v2.2.0
11-
"actions/setup-node@c46424eee26de4078d34105d3de3cc4992202b1e", //actions/setup-node@v2.1.4
12-
"ruby/setup-ruby@fdcfbcf14ec9672f6f615cb9589a1bc5dd69d262", //ruby/setup-ruby@vv1.64.1
13-
"actions/stale@9d6f46564a515a9ea11e7762ab3957ee58ca50da", //actions/stale@v3.0.16
7+
"actions/cache@0781355a23dac32fd3bac414512f4b903437991a", // v2.1.3
8+
"actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f", // v2.3.4
9+
"actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9", // v3.0.0
10+
"actions/labeler@5f867a63be70efff62b767459b009290364495eb", // v2.2.0
11+
"actions/setup-node@c46424eee26de4078d34105d3de3cc4992202b1e", // v2.1.4
12+
"ruby/setup-ruby@fdcfbcf14ec9672f6f615cb9589a1bc5dd69d262", // v1.64.1
13+
"actions/stale@9d6f46564a515a9ea11e7762ab3957ee58ca50da", // v3.0.16
1414
"alex-page/github-project-automation-plus@fdb7991b72040d611e1123d2b75ff10eda9372c9",
1515
"andymckay/labeler@22d5392de2b725cea4b284df5824125054049d84",
1616
"archive/github-actions-slack@d368c5a4ad757515a9344918f84c490b05777d94",
@@ -23,11 +23,11 @@ module.exports = [
2323
"github/codeql-action/analyze@v1",
2424
"github/codeql-action/init@v1",
2525
"juliangruber/approve-pull-request-action@c530832d4d346c597332e20e03605aa94fa150a8",
26-
"juliangruber/find-pull-request-action@2fc55e82a6d5d36fe1e7f1848f7e64fd02d99de9",
26+
"juliangruber/find-pull-request-action@db875662766249c049b2dcd85293892d61cb0b51", // v1.5.0
2727
"juliangruber/read-file-action@e0a316da496006ffd19142f0fd594a1783f3b512",
2828
"lee-dohm/close-matching-issues@22002609b2555fe18f52b8e2e7c07cbf5529e8a8",
2929
"lee-dohm/no-response@9bb0a4b5e6a45046f00353d5de7d90fb8bd773bb",
30-
"pascalgn/automerge-action@c9bd1823770819dc8fb8a5db2d11a3a95fbe9b07", //pascalgn/automerge@0.12.0
30+
"pascalgn/automerge-action@c9bd1823770819dc8fb8a5db2d11a3a95fbe9b07", // v0.12.0
3131
"peter-evans/create-issue-from-file@a04ce672e3acedb1f8e416b46716ddfd09905326",
3232
"peter-evans/create-or-update-comment@5221bf4aa615e5c6e95bb142f9673a9c791be2cd",
3333
"peter-evans/create-pull-request@8c603dbb04b917a9fc2dd991dc54fef54b640b43",

.github/workflows/confirm-internal-staff-work-in-docs.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ jobs:
6161
owner: 'github',
6262
repo: 'docs-internal',
6363
title: `@${context.payload.sender.login} confirm that \#${issueNo} should be in the public github/docs repo`,
64-
body: `@${context.payload.sender.login} opened https://github.com/github/docs/issues/${issueNo} publicly in the github/docs repo, instead of the private github/docs-internal repo.\n\n@${context.payload.sender.login}, please confirm that this belongs in the public repo and that no sensitive information was disclosed by commenting below and closing the issue.\n\nIf this was not intentional and sensitive information was shared, please delete https://github.com/github/docs/issues/${issueNo} and notify us in the \#docs-open-source channel.\n\nThanks! \n\n/cc @github/docs @github/docs-engineering`
64+
body: `@${context.payload.sender.login} opened https://github.com/github/docs/issues/${issueNo} publicly in the github/docs repo, instead of the private github/docs-internal repo.\n\n@${context.payload.sender.login}, please confirm that this belongs in the public repo and that no sensitive information was disclosed by commenting below and closing the issue.\n\nIf this was not intentional and sensitive information was shared, please delete https://github.com/github/docs/issues/${issueNo} and notify us in the \#docs-open-source channel.\n\nThanks! \n\n/cc @github/docs @github/docs-engineering`,
65+
labels: ['OS confirmation'],
6566
});
6667
6768
core.setOutput('did_warn', 'true')
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: Copy to REST API issue to docs-content
2+
3+
# **What it does**: Copies an issue in the open source repo to the docs-content repo, comments on and closes the original issue
4+
# **Why we have it**: REST API updates cannot be made in the open source repo. Instead, we copy the issue to an internal issue (we do not transfer so that the issue does not disappear for the contributor) and close the original issue.
5+
# **Who does it impact**: Open source and docs-content maintainers
6+
7+
on:
8+
issues:
9+
types:
10+
- labeled
11+
12+
jobs:
13+
transfer-issue:
14+
name: Transfer issue
15+
runs-on: ubuntu-latest
16+
if: github.event.label.name == 'rest-description' && github.repository == 'github/docs'
17+
steps:
18+
- name: Check if this run was triggered by a member of the docs team
19+
uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
20+
id: triggered-by-member
21+
with:
22+
github-token: ${{secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES}}
23+
result-encoding: string
24+
script: |
25+
const triggerer_login = context.payload.sender.login
26+
const teamMembers = await github.request(
27+
`/orgs/github/teams/docs/members?per_page=100`
28+
)
29+
const logins = teamMembers.data.map(member => member.login)
30+
if (logins.includes(triggerer_login)) {
31+
console.log(`This workflow was triggered by ${triggerer_login} (on the docs team).`)
32+
return 'true'
33+
}
34+
console.log(`This workflow was triggered by ${triggerer_login} (not on the docs team), so no action will be taken.`)
35+
return 'false'
36+
37+
- name: Exit if not triggered by a docs team member
38+
if: steps.triggered-by-member.outputs.result == 'false'
39+
run: |
40+
echo Aborting. This workflow must be triggered by a member of the docs team.
41+
exit 1
42+
43+
- name: Create an issue in the docs-content repo
44+
run: |
45+
new_issue_url="$(gh issue create --title "$ISSUE_TITLE" --body "$ISSUE_BODY" --repo github/docs-content)"
46+
echo 'NEW_ISSUE='$new_issue_url >> $GITHUB_ENV
47+
env:
48+
GITHUB_TOKEN: ${{secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES}}
49+
ISSUE_TITLE: ${{ github.event.issue.title }}
50+
ISSUE_BODY: ${{ github.event.issue.body }}
51+
52+
- name: Comment on the new issue
53+
run: gh issue comment $NEW_ISSUE --body "This issue was originally opened in the open source repo as $OLD_ISSUE"
54+
env:
55+
GITHUB_TOKEN: ${{secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES}}
56+
NEW_ISSUE: ${{ env.NEW_ISSUE }}
57+
OLD_ISSUE: ${{ github.event.issue.html_url }}
58+
59+
- name: Comment on the old issue
60+
run: gh issue comment $OLD_ISSUE --body "Thank you for opening this issue! Updates to the REST API description must be made internally. I have copied your issue to an internal issue, so I will close this issue."
61+
env:
62+
GITHUB_TOKEN: ${{secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES}}
63+
OLD_ISSUE: ${{ github.event.issue.html_url }}
64+
65+
- name: Close the old issue
66+
run: gh issue close $OLD_ISSUE
67+
env:
68+
GITHUB_TOKEN: ${{secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES}}
69+
OLD_ISSUE: ${{ github.event.issue.html_url }}
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
name: Enterprise date updater
2+
3+
# **What it does**: Runs on a schedule to update lib/enterprise-dates.json.
4+
# **Why we have it**: The lib/enterprise-dates.json file needs to be up-to-date
5+
# for the .github/workflows/open-enterprise-issue.yml workflow and the
6+
# tests/content/algolia-search.js test.
7+
# **Who does it impact**: Docs engineering, docs content.
8+
9+
on:
10+
workflow_dispatch:
11+
schedule:
12+
- cron: '39 2 * * 2' # At 02:39 on Tuesday
13+
14+
# **IMPORTANT:** Do not change the FREEZE environment variable set here!
15+
# This workflow runs on a recurring basis. To temporarily disable it (e.g.,
16+
# during a docs deployment freeze), add an Actions Secret to the repo settings
17+
# called `FREEZE` with a value of `true`. To re-enable updates, simply
18+
# delete that Secret from the repo settings. The environment variable here
19+
# will duplicate that Secret's value for later evaluation.
20+
env:
21+
FREEZE: ${{ secrets.FREEZE }}
22+
23+
jobs:
24+
open_enterprise_issue:
25+
name: Enterprise date updater
26+
if: github.repository == 'github/docs-internal'
27+
runs-on: ubuntu-latest
28+
steps:
29+
- if: ${{ env.FREEZE == 'true' }}
30+
run: |
31+
echo 'The repo is currently frozen! Exiting this workflow.'
32+
exit 1 # prevents further steps from running
33+
34+
- name: Checkout repository code
35+
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
36+
37+
- name: Install Node.js dependencies
38+
run: npm ci
39+
40+
- name: Run script/update-enterprise-dates.js
41+
run: |
42+
script/update-enterprise-dates.js
43+
env:
44+
GITHUB_TOKEN: ${{ secrets.DOCS_BOT }}
45+
46+
- name: Create pull request
47+
id: create-pull-request
48+
uses: peter-evans/create-pull-request@8c603dbb04b917a9fc2dd991dc54fef54b640b43
49+
with:
50+
# need to use a token with repo and workflow scopes for this step
51+
token: ${{ secrets.GITHUB_TOKEN }}
52+
commit-message: '🤖 ran script/update-enterprise-dates.js'
53+
title: 🤖 lib/enterprise-dates.json update
54+
body:
55+
"Hello! The GitHub Enterprise Server release dates have changed.\n\n
56+
If CI passes, this PR will be auto-merged. :green_heart:\n\n
57+
If CI does not pass or other problems arise, contact #docs-engineering on slack.\n\nThis PR was 🤖-crafted by `.github/workflows/enterprise-dates.yml`. 🧶"
58+
labels: automerge,autoupdate
59+
branch: enterprise-server-dates-update
60+
delete-branch: true
61+
62+
- if: ${{ failure() }}
63+
name: Delete remote branch (if previous steps failed)
64+
uses: dawidd6/action-delete-branch@47743101a121ad657031e6704086271ca81b1911
65+
with:
66+
github_token: ${{ secrets.GITHUB_TOKEN }}
67+
branches: enterprise-server-dates-update
68+
69+
- if: ${{ steps.create-pull-request.outputs.pull-request-number }}
70+
name: Approve
71+
uses: juliangruber/approve-pull-request-action@c530832d4d346c597332e20e03605aa94fa150a8
72+
with:
73+
github-token: ${{ secrets.DOCUBOT_REPO_PAT }}
74+
number: ${{ steps.create-pull-request.outputs.pull-request-number }}
75+
76+
- name: Send Slack notification if workflow fails
77+
uses: someimportantcompany/github-actions-slack-message@0b470c14b39da4260ed9e3f9a4f1298a74ccdefd
78+
if: failure()
79+
with:
80+
channel: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }}
81+
bot-token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }}
82+
color: failure
83+
text: The last enterprise-dates run for ${{github.repository}} failed. See https://github.com/${{github.repository}}/actions/workflows/enterprise-dates.yml

.github/workflows/js-lint.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,3 @@ jobs:
4141

4242
- name: Run linter
4343
run: npx eslint .
44-
45-
- name: Check dependencies
46-
run: npm run check-deps

.github/workflows/move-ready-to-merge-issues.yaml renamed to .github/workflows/move-ready-to-merge-pr.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
name: Move and unlabel ready to merge issues
1+
name: Move and unlabel ready to merge PRs
22

3-
# **What it does**: This moves ready to merge issues on the project board for the open source repo. When an issue in the open source repo is labeled "ready to merge," the "waiting for review" label is removed and the issue is moved to the "Triage" column.
4-
# **Why we have it**: To help with managing our project boards.
3+
# **What it does**: When a PR in the open source repo is labeled "ready to merge," the "waiting for review" label is removed and the PR is moved to the "Triage" column.
4+
# **Why we have it**: To help with managing our project boards.
55
# **Who does it impact**: Open source contributors, open-source maintainers.
66

77
on:
@@ -14,7 +14,7 @@ jobs:
1414
if: github.repository == 'github/docs' && github.event.label.name == 'ready to merge'
1515
runs-on: ubuntu-latest
1616
steps:
17-
- name: move issue
17+
- name: move PR
1818
uses: alex-page/github-project-automation-plus@fdb7991b72040d611e1123d2b75ff10eda9372c9
1919
with:
2020
project: Docs team reviews

.github/workflows/no-response.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ name: No Response
99

1010
on:
1111
issue_comment:
12-
types: created
12+
types: [created]
1313

1414
schedule:
1515
# Schedule for five minutes after the hour every hour
@@ -27,4 +27,6 @@ jobs:
2727
to our request for more information from the original author. With only the
2828
information that is currently in the issue, we don't have enough information
2929
to take action. Please reach out if you have or find the answers we need so
30-
that we can investigate further. See [this blog post on bug reports and the importance of repro steps](https://www.lee-dohm.com/2015/01/04/writing-good-bug-reports/) for more information about the kind of information that may be helpful.
30+
that we can investigate further. See [this blog post on bug reports and the
31+
importance of repro steps](https://www.lee-dohm.com/2015/01/04/writing-good-bug-reports/)
32+
for more information about the kind of information that may be helpful.

0 commit comments

Comments
 (0)