Skip to content

Commit

Permalink
Merge branch 'main' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
hubwriter authored Mar 3, 2021
2 parents e7445c6 + a216cd5 commit 3e04505
Show file tree
Hide file tree
Showing 9,142 changed files with 1,625,428 additions and 347,775 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
26 changes: 26 additions & 0 deletions .github/ISSUE_COMMENT_TEMPLATE/status.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
name: Status Update
about: A brief status update.
body:
- type: dropdown
attributes:
name: Status
options:
- name: "GREEN \U0001F34F (All good, smooth sailing)"
value: 'Status: GREEN'
- name: "YELLOW \U0001F7E1 (On track, with hurdles to work through)"
value: 'Status: YELLOW'
- name: "RED \U0001F534 (BLOCKED)"
value: 'Status: RED'
- type: input
attributes:
name: Update Summary
placeholder:
Brief summary of the status and next steps. Any blockers should be
called out specifically.
inputType: longText
- type: input
attributes:
name: 'Attribution'
value: '_created with :heart: by typing_ `/status`'
inputType: text
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/improve-the-site.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Check to make sure someone hasn't already opened a similar issue: https://github

### What is the current behavior?

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

### What changes are you suggesting?

Expand Down
1 change: 1 addition & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Thanks again!
<!--
- If there's an existing issue for your change, please link to it.
- If there's _not_ an existing issue, please open one first to make it more likely that this update will be accepted: https://github.com/github/docs/issues/new/choose. -->
**Closes [issue link]**

### What's being changed:

Expand Down
66 changes: 35 additions & 31 deletions .github/allowed-actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,34 +4,38 @@
// can be added it this list.

module.exports = [
'actions/cache@0781355a23dac32fd3bac414512f4b903437991a', //actions/[email protected]
'actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f', //actions/[email protected]
'actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9', //actions/[email protected]
'actions/labeler@5f867a63be70efff62b767459b009290364495eb', //actions/[email protected]
'actions/setup-node@56899e050abffc08c2b3b61f3ec6a79a9dc3223d', //actions/[email protected]
'actions/setup-ruby@5f29a1cd8dfebf420691c4c9a0e832e2fae5a526', //actions/[email protected]
'actions/stale@af4072615903a8b031f986d25b1ae3bf45ec44d4', //actions/[email protected]
'crowdin/github-action@fd9429dd63d6c0f8a8cb4b93ad8076990bd6e688',
'dawidd6/action-delete-branch@47743101a121ad657031e6704086271ca81b1911',
'docker://chinthakagodawita/autoupdate-action:v1',
'fkirc/skip-duplicate-actions@36feb0d8d062137530c2e00bd278d138fe191289',
'github/codeql-action/analyze@v1',
'github/codeql-action/init@v1',
'ianwalter/puppeteer@12728ddef82390d1ecd4732fb543f62177392fbb',
'juliangruber/approve-pull-request-action@c530832d4d346c597332e20e03605aa94fa150a8',
'juliangruber/find-pull-request-action@64d55773c959748ad30a4184f4dc102af1669f7b',
'juliangruber/read-file-action@e0a316da496006ffd19142f0fd594a1783f3b512',
'lee-dohm/close-matching-issues@22002609b2555fe18f52b8e2e7c07cbf5529e8a8',
'pascalgn/automerge-action@c9bd182',
'peter-evans/create-issue-from-file@a04ce672e3acedb1f8e416b46716ddfd09905326',
'peter-evans/create-or-update-comment@5221bf4aa615e5c6e95bb142f9673a9c791be2cd',
'peter-evans/create-pull-request@8c603dbb04b917a9fc2dd991dc54fef54b640b43',
'rachmari/actions-add-new-issue-to-column@1a459ef92308ba7c9c9dc2fcdd72f232495574a9',
'rachmari/labeler@832d42ec5523f3c6d46e8168de71cd54363e3e2e',
'repo-sync/github-sync@3832fe8e2be32372e1b3970bbae8e7079edeec88',
'repo-sync/pull-request@33777245b1aace1a58c87a29c90321aa7a74bd7d',
'someimportantcompany/github-actions-slack-message@0b470c14b39da4260ed9e3f9a4f1298a74ccdefd',
'tjenkinson/gh-action-auto-merge-dependency-updates@cee2ac0',
'EndBug/add-and-commit@9358097a71ad9fb9e2f9624c6098c89193d83575',
'dorny/paths-filter@eb75a1edc117d3756a18ef89958ee59f9500ba58'
]
"actions/cache@0781355a23dac32fd3bac414512f4b903437991a", //actions/[email protected]
"actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f", //actions/[email protected]
"actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9", //actions/[email protected]
"actions/labeler@5f867a63be70efff62b767459b009290364495eb", //actions/[email protected]
"actions/setup-node@c46424eee26de4078d34105d3de3cc4992202b1e", //actions/[email protected]
"ruby/setup-ruby@fdcfbcf14ec9672f6f615cb9589a1bc5dd69d262", //ruby/[email protected]
"actions/stale@9d6f46564a515a9ea11e7762ab3957ee58ca50da", //actions/[email protected]
"archive/github-actions-slack@d368c5a4ad757515a9344918f84c490b05777d94",
"ashley-taylor/regex-property-action@93a24f845cd20790924208225cc72da8b4c6d46d",
"crowdin/github-action@fd9429dd63d6c0f8a8cb4b93ad8076990bd6e688",
"crykn/copy_folder_to_another_repo_action@0282e8b9fef06de92ddcae9fe6cb44df6226646c",
"cschleiden/actions-linter@0ff16d6ac5103cca6c92e6cbc922b646baaea5be",
"dawidd6/action-delete-branch@47743101a121ad657031e6704086271ca81b1911",
"docker://chinthakagodawita/autoupdate-action:v1",
"fkirc/skip-duplicate-actions@36feb0d8d062137530c2e00bd278d138fe191289",
"github/codeql-action/analyze@v1",
"github/codeql-action/init@v1",
"ianwalter/puppeteer-container@2466ba8ecf689ccf4e5dfadeff3ac2db227b2e17",
"juliangruber/approve-pull-request-action@c530832d4d346c597332e20e03605aa94fa150a8",
"juliangruber/find-pull-request-action@2fc55e82a6d5d36fe1e7f1848f7e64fd02d99de9",
"juliangruber/read-file-action@e0a316da496006ffd19142f0fd594a1783f3b512",
"lee-dohm/close-matching-issues@22002609b2555fe18f52b8e2e7c07cbf5529e8a8",
"pascalgn/automerge-action@c9bd1823770819dc8fb8a5db2d11a3a95fbe9b07", //pascalgn/[email protected]
"peter-evans/create-issue-from-file@a04ce672e3acedb1f8e416b46716ddfd09905326",
"peter-evans/create-or-update-comment@5221bf4aa615e5c6e95bb142f9673a9c791be2cd",
"peter-evans/create-pull-request@8c603dbb04b917a9fc2dd991dc54fef54b640b43",
"rachmari/actions-add-new-issue-to-column@1a459ef92308ba7c9c9dc2fcdd72f232495574a9",
"rachmari/labeler@832d42ec5523f3c6d46e8168de71cd54363e3e2e",
"repo-sync/github-sync@3832fe8e2be32372e1b3970bbae8e7079edeec88",
"repo-sync/pull-request@33777245b1aace1a58c87a29c90321aa7a74bd7d",
"someimportantcompany/github-actions-slack-message@0b470c14b39da4260ed9e3f9a4f1298a74ccdefd",
"tjenkinson/gh-action-auto-merge-dependency-updates@4d7756c04d9d999c5968697a621b81c47f533d61",
"EndBug/add-and-commit@9358097a71ad9fb9e2f9624c6098c89193d83575",
"dorny/paths-filter@eb75a1edc117d3756a18ef89958ee59f9500ba58",
];
3 changes: 2 additions & 1 deletion .github/workflows/60-days-stale-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ on:

jobs:
stale:
if: github.repository == 'github/docs-internal' || github.repository == 'github/docs'
runs-on: ubuntu-latest
steps:
- uses: actions/stale@af4072615903a8b031f986d25b1ae3bf45ec44d4
- uses: actions/stale@9d6f46564a515a9ea11e7762ab3957ee58ca50da
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'This issue is stale because it has been open 60 days with no activity.'
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/auto-label-prs.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Auto label Pull Requests

on:
pull_request:

Expand All @@ -7,6 +8,7 @@ jobs:
if: github.repository == 'github/docs-internal'
runs-on: ubuntu-latest
steps:
# See labeling configuration in the `.github/labeler.yml` file
- uses: actions/labeler@5f867a63be70efff62b767459b009290364495eb
with:
repo-token: '${{ secrets.GITHUB_TOKEN }}'
3 changes: 2 additions & 1 deletion .github/workflows/automerge-dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ on:

jobs:
run:
if: github.repository == 'github/docs-internal' || github.repository == 'github/docs'
runs-on: ubuntu-latest
steps:
- uses: tjenkinson/gh-action-auto-merge-dependency-updates@cee2ac0
- uses: tjenkinson/gh-action-auto-merge-dependency-updates@4d7756c04d9d999c5968697a621b81c47f533d61
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
allowed-actors: dependabot[bot]
4 changes: 2 additions & 2 deletions .github/workflows/automerge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ on:
jobs:
automerge:
runs-on: ubuntu-latest
if: contains(github.event.pull_request.labels.*.name, 'automerge') || contains(github.event.pull_request.labels.*.name, 'autosquash')
if: (contains(github.event.pull_request.labels.*.name, 'automerge') || contains(github.event.pull_request.labels.*.name, 'autosquash')) && (github.repository == 'github/docs-internal' || github.repository == 'github/docs')
steps:
- name: automerge
uses: 'pascalgn/automerge-action@c9bd182'
uses: 'pascalgn/automerge-action@c9bd1823770819dc8fb8a5db2d11a3a95fbe9b07'
env:
GITHUB_TOKEN: '${{ secrets.OCTOMERGER_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }}'
MERGE_METHOD_LABELS: 'automerge=merge,autosquash=squash'
Expand Down
18 changes: 17 additions & 1 deletion .github/workflows/autoupdate-branch.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,28 @@
name: autoupdate branch

#
# This workflow checks all open PRs targeting `main` as their base branch and
# will attempt to update them if they have the `autoupdate` label applied.
# It is triggered when a `push` event occurs ON the `main` branch (e.g. a PR
# was merged or a force-push was done).
#
# It should work on all PRs created from source branches within the repo itself
# but is unlikely to work for PRs created from forked repos.
#
# It is still worthwhile to leave it enabled for the `docs` open source repo as
# it should at least be running on `repo-sync` branch PRs.
#

on:
push:
branches:
- main

jobs:
autoupdate:
if: github.repository == 'github/docs-internal' || github.repository == 'github/docs'
name: autoupdate
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
steps:
- uses: docker://chinthakagodawita/autoupdate-action:v1
env:
Expand Down
13 changes: 11 additions & 2 deletions .github/workflows/browser-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ name: Browser Tests
on:
workflow_dispatch:
push:
branches:
- main
pull_request:

jobs:
see_if_should_skip:
Expand All @@ -28,14 +31,20 @@ jobs:
name: Checkout
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f

- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
name: Setup Node
uses: actions/setup-node@c46424eee26de4078d34105d3de3cc4992202b1e
with:
node-version: 14.x

- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
name: Install
uses: ianwalter/puppeteer@12728ddef82390d1ecd4732fb543f62177392fbb
uses: ianwalter/puppeteer-container@2466ba8ecf689ccf4e5dfadeff3ac2db227b2e17
with:
args: npm ci

- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
name: Test
uses: ianwalter/puppeteer@12728ddef82390d1ecd4732fb543f62177392fbb
uses: ianwalter/puppeteer-container@2466ba8ecf689ccf4e5dfadeff3ac2db227b2e17
with:
args: npm run browser-test
24 changes: 24 additions & 0 deletions .github/workflows/build-docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Make sure the Docker container still builds

name: Build Docker image

on:
push:
branches:
- main
pull_request:

env:
CI: true

jobs:
build:
# Do not run this job for translations PRs
if: ${{ github.ref != 'refs/heads/translations' }}

runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
- name: Build the container
run: docker build .
62 changes: 62 additions & 0 deletions .github/workflows/check-for-spammy-issues.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Check for Spammy Issues
on:
issues:
types: [opened]
jobs:
spammy-title-check:
name: Remove issues with spammy titles
if: github.repository == 'github/docs'
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
with:
github-token: ${{ secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES }}
script: |
const issue = context.payload.issue
const owner = 'github'
const repo = 'docs'
const titleWordCount = issue.title.trim().split(' ').length
const titleWordCountMin = 2
try {
await github.teams.getMembershipForUserInOrg({
org: 'github',
team_slug: 'employees',
username: context.payload.sender.login,
});
// Do not perform this workflow with GitHub employees. This return
// statement only gets hit if the user is a GitHub employee
return
} catch(err) {
// An error will be thrown if the user is not a GitHub employee
// 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
if(titleWordCount > titleWordCountMin) {
return
}
}
//
// Assuming the user is not a GitHub employee and the issue title
// has the minimum number of words required, proceed.
//
// Close the issue and add the invalid label
await github.issues.update({
owner: owner,
repo: repo,
issue_number: issue.number,
labels: ['invalid'],
state: 'closed'
});
// Comment on the issue
await github.issues.createComment({
owner: owner,
repo: repo,
issue_number: issue.number,
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)!"
});
61 changes: 61 additions & 0 deletions .github/workflows/close-external-repo-sync-prs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Check for External Repo Sync PR

on:
pull_request:
types:
- opened
- reopened
branches:
- main

jobs:
invalid-repo-sync-check:
name: Close external Repo Sync PRs
if: ${{ github.repository == 'github/docs' && github.ref == 'refs/heads/repo-sync' }}
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
with:
github-token: ${{ secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES }}
script: |
const prCreator = context.payload.sender.login
// If the PR creator is the expected account, stop now
if (prCreator === 'Octomerger') {
return
}
try {
await github.teams.getMembershipForUserInOrg({
org: 'github',
team_slug: 'employees',
username: prCreator
})
// If the PR creator is a GitHub employee, stop now
return
} catch (err) {
// An error will be thrown if the user is not a GitHub employee.
// That said, we still want to proceed anyway!
}
const pr = context.payload.pull_request
const { owner, repo } = context.repo
// Close the PR and add the invalid label
await github.issues.update({
owner: owner,
repo: repo,
issue_number: pr.number,
labels: ['invalid'],
state: 'closed'
})
// Comment on the PR
await github.issues.createComment({
owner: owner,
repo: repo,
issue_number: pr.number,
body: "Please leave this `repo-sync` branch to the robots!\n\nI'm going to close this pull request now, but feel free to open a new issue or ask any questions in [discussions](https://github.com/github/docs/discussions)!"
})
Loading

0 comments on commit 3e04505

Please sign in to comment.