Skip to content

Commit

Permalink
merge from main
Browse files Browse the repository at this point in the history
  • Loading branch information
saritai committed Oct 19, 2021
2 parents 3379c99 + f1a8e0e commit 5d0d6b7
Show file tree
Hide file tree
Showing 1,724 changed files with 11,674 additions and 19,959 deletions.
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ See our [CONTRIBUTING.md](/main/CONTRIBUTING.md) for information how to contribu
For changes to content in [site policy](https://github.com/github/docs/tree/main/content/github/site-policy), see the [CONTRIBUTING guide in the site-policy repo](https://github.com/github/site-policy/blob/main/CONTRIBUTING.md).
We cannot accept changes to our translated content right now. See the [contributing.md](/main/CONTRIBUTING.md#earth_asia-translations) for more information.
We cannot accept changes to our translated content right now. See the [types-of-contributions.md](/main/contributing/types-of-contributions.md#earth_asia-translations) for more information.
Thanks again!
-->
Expand Down
7 changes: 5 additions & 2 deletions .github/actions-scripts/projects.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,13 @@ export function generateUpdateProjectNextItemFieldMutation({
function generateMutationToUpdateField({ item, fieldID, value, literal = false }) {
const parsedValue = literal ? `value: "${value}"` : `value: ${value}`

// Strip "=" out of the item ID when creating the mutation ID to avoid a GraphQL parsing error
// Strip all non-alphanumeric out of the item ID when creating the mutation ID to avoid a GraphQL parsing error
// (statistically, this should still give us a unique mutation ID)
return `
set_${fieldID.substr(1)}_item_${item.replaceAll('=', '')}: updateProjectNextItemField(input: {
set_${fieldID.substr(1)}_item_${item.replaceAll(
/[^a-z0-9]/g,
''
)}: updateProjectNextItemField(input: {
projectId: $project
itemId: "${item}"
fieldId: ${fieldID}
Expand Down
6 changes: 3 additions & 3 deletions .github/allowed-actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default [
'actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f', // v2.3.4
'actions/github-script@2b34a689ec86a68d8ab9478298f91d5401337b7d', // v4.0.2
'actions/labeler@5f867a63be70efff62b767459b009290364495eb', // v2.2.0
'actions/setup-node@38d90ce44d5275ad62cc48384b3d8a58c500bb5f', // v2.2.0
'actions/setup-node@270253e841af726300e85d718a5f606959b2903c', // v2.4.1
'actions/stale@cdf15f641adb27a71842045a94023bef6945e3aa', // v4.0.0
'actions/upload-artifact@27121b0bdffd731efa15d66772be8dc71245d074', // v2.2.4
'alex-page/github-project-automation-plus@bb266ff4dde9242060e2d5418e120a133586d488', // v0.8.1
Expand All @@ -29,12 +29,12 @@ export default [
'peter-evans/create-issue-from-file@b4f9ee0a9d4abbfc6986601d9b1a4f8f8e74c77e',
'peter-evans/create-or-update-comment@5221bf4aa615e5c6e95bb142f9673a9c791be2cd',
'peter-evans/create-pull-request@7380612b49221684fefa025244f2ef4008ae50ad', // v3.10.1
'peter-evans/find-comment@0da1f4fc1f20cd898368bd56089d391df418f52f',
'peter-evans/find-comment@d2dae40ed151c634e4189471272b57e76ec19ba8', // v1.3.0
'rachmari/actions-add-new-issue-to-column@1a459ef92308ba7c9c9dc2fcdd72f232495574a9',
'repo-sync/github-sync@3832fe8e2be32372e1b3970bbae8e7079edeec88',
'repo-sync/pull-request@65194d8015be7624d231796ddee1cd52a5023cb3', // v2.6
'someimportantcompany/github-actions-slack-message@0b470c14b39da4260ed9e3f9a4f1298a74ccdefd',
'tjenkinson/gh-action-auto-merge-dependency-updates@4d7756c04d9d999c5968697a621b81c47f533d61',
'tjenkinson/gh-action-auto-merge-dependency-updates@c47f6255e06f36e84201ee940466e731ffa6e885', // v1.1.1
'Bhacaz/checkout-files@c8f01756bfd894ba746d5bf48205e19000b0742b', // v1.0.0
'EndBug/add-and-commit@2bdc0a61a03738a1d1bda24d566ad0dbe3083d87',
]
2 changes: 1 addition & 1 deletion .github/workflows/60-days-stale-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ jobs:
stale-issue-label: 'stale'
stale-pr-label: 'stale'
exempt-pr-labels: 'never-stale'
exempt-issue-labels: 'never-stale'
exempt-issue-labels: 'never-stale, help wanted, waiting for review'
2 changes: 1 addition & 1 deletion .github/workflows/automerge-dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
}}
runs-on: ubuntu-latest
steps:
- uses: tjenkinson/gh-action-auto-merge-dependency-updates@4d7756c04d9d999c5968697a621b81c47f533d61
- uses: tjenkinson/gh-action-auto-merge-dependency-updates@c47f6255e06f36e84201ee940466e731ffa6e885
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
allowed-actors: dependabot[bot]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/browser-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
run: git lfs checkout

- name: Setup Node
uses: actions/setup-node@38d90ce44d5275ad62cc48384b3d8a58c500bb5f
uses: actions/setup-node@270253e841af726300e85d718a5f606959b2903c
with:
node-version: 16.8.x
cache: npm
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-all-english-links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Check out repo's default branch
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
- name: Setup Node
uses: actions/setup-node@38d90ce44d5275ad62cc48384b3d8a58c500bb5f
uses: actions/setup-node@270253e841af726300e85d718a5f606959b2903c
with:
node-version: 16.8.x
cache: npm
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-broken-links-github-github.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f

- name: Setup Node
uses: actions/setup-node@38d90ce44d5275ad62cc48384b3d8a58c500bb5f
uses: actions/setup-node@270253e841af726300e85d718a5f606959b2903c
with:
node-version: 16.8.x
cache: npm
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/content-changes-table-comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f

- name: Setup Node
uses: actions/setup-node@38d90ce44d5275ad62cc48384b3d8a58c500bb5f
uses: actions/setup-node@270253e841af726300e85d718a5f606959b2903c
with:
node-version: 16.8.x
cache: npm
Expand Down Expand Up @@ -102,7 +102,7 @@ jobs:
core.setOutput('changesTable', markdownTable)
- name: Find content directory changes comment
uses: peter-evans/find-comment@0da1f4fc1f20cd898368bd56089d391df418f52f
uses: peter-evans/find-comment@d2dae40ed151c634e4189471272b57e76ec19ba8
id: findComment
with:
issue-number: ${{ github.event.pull_request.number }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/crowdin-cleanup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f

- name: Setup Node
uses: actions/setup-node@38d90ce44d5275ad62cc48384b3d8a58c500bb5f
uses: actions/setup-node@270253e841af726300e85d718a5f606959b2903c
with:
node-version: 16.8.x
cache: npm
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs-review-collect.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f

- name: Setup Node
uses: actions/setup-node@38d90ce44d5275ad62cc48384b3d8a58c500bb5f
uses: actions/setup-node@270253e841af726300e85d718a5f606959b2903c
with:
node-version: 16.8.x
cache: npm
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/enterprise-dates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f

- name: Setup Node
uses: actions/setup-node@38d90ce44d5275ad62cc48384b3d8a58c500bb5f
uses: actions/setup-node@270253e841af726300e85d718a5f606959b2903c
with:
node-version: 16.8.x
cache: npm
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/enterprise-release-sync-search-index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
token: ${{ secrets.DOCUBOT_REPO_PAT }}

- name: Setup Node
uses: actions/setup-node@38d90ce44d5275ad62cc48384b3d8a58c500bb5f
uses: actions/setup-node@270253e841af726300e85d718a5f606959b2903c
with:
node-version: 16.8.x
cache: npm
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/js-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f

- name: Setup node
uses: actions/setup-node@38d90ce44d5275ad62cc48384b3d8a58c500bb5f
uses: actions/setup-node@270253e841af726300e85d718a5f606959b2903c
with:
node-version: 16.8.x
cache: npm
Expand All @@ -28,4 +28,4 @@ jobs:
run: npm ci

- name: Run linter
run: npx eslint .
run: npm run lint
2 changes: 1 addition & 1 deletion .github/workflows/link-check-dotcom.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f

- name: Setup node
uses: actions/setup-node@38d90ce44d5275ad62cc48384b3d8a58c500bb5f
uses: actions/setup-node@270253e841af726300e85d718a5f606959b2903c
with:
node-version: 16.8.x
cache: npm
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/link-check-ghae.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f

- name: Setup node
uses: actions/setup-node@38d90ce44d5275ad62cc48384b3d8a58c500bb5f
uses: actions/setup-node@270253e841af726300e85d718a5f606959b2903c
with:
node-version: 16.8.x
cache: npm
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/link-check-ghes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f

- name: Setup node
uses: actions/setup-node@38d90ce44d5275ad62cc48384b3d8a58c500bb5f
uses: actions/setup-node@270253e841af726300e85d718a5f606959b2903c
with:
node-version: 16.8.x
cache: npm
Expand Down
64 changes: 64 additions & 0 deletions .github/workflows/notify-when-maintainers-cannot-edit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Notify When Maintainers Cannot Edit

# **What it does**: Notifies the author of a PR when their PR does not allow maintainers to edit it.
# **Why we have it**: To prevent having to do this manually.
# **Who does it impact**: Open-source.

on:
pull_request_target:
types:
- opened

permissions:
pull-requests: write

jobs:
notify-when-maintainers-cannot-edit:
if: github.repository == 'github/docs'
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@2b34a689ec86a68d8ab9478298f91d5401337b7d
with:
script: |
const query = `
query($number: Int!) {
repository(owner: "github", name: "docs") {
pullRequest(number: $number) {
headRepositoryOwner {
login
}
maintainerCanModify
}
}
}
`;
const pullNumber = context.issue.number;
const variables = { number: pullNumber };
try {
console.log(`Check github/docs#${pullNumber} for maintainer edit access ...`);
const result = await github.graphql(query, variables);
console.log(JSON.stringify(result, null, 2));
const pullRequest = result.repository.pullRequest;
if (pullRequest.headRepositoryOwner.login === 'github') {
console.log('PR owned by github');
return;
}
if (!pullRequest.maintainerCanModify) {
console.log('PR not owned by github and does not have maintainer edits enabled');
await github.issues.createComment({
issue_number: pullNumber,
owner: 'github',
repo: 'docs',
body: "Thanks for submitting a PR to the GitHub Docs project!\n\nIn order to review and merge PRs most efficiently, we require that all PRs grant maintainer edit access before we review them. For information on how to do this, [see the documentation](https://docs.github.com/en/github/collaborating-with-pull-requests/working-with-forks/allowing-changes-to-a-pull-request-branch-created-from-a-fork)."
});
}
} catch(e) {
console.log(e);
}
2 changes: 1 addition & 1 deletion .github/workflows/open-enterprise-issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f

- name: Setup Node
uses: actions/setup-node@38d90ce44d5275ad62cc48384b3d8a58c500bb5f
uses: actions/setup-node@270253e841af726300e85d718a5f606959b2903c
with:
node-version: 16.8.x
cache: npm
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/openapi-decorate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f

- name: Setup node
uses: actions/setup-node@38d90ce44d5275ad62cc48384b3d8a58c500bb5f
uses: actions/setup-node@270253e841af726300e85d718a5f606959b2903c
with:
node-version: 16.8.x
cache: npm
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/openapi-schema-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f

- name: Setup node
uses: actions/setup-node@38d90ce44d5275ad62cc48384b3d8a58c500bb5f
uses: actions/setup-node@270253e841af726300e85d718a5f606959b2903c
with:
node-version: 16.8.x
cache: npm
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/os-ready-for-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f

- name: Setup Node
uses: actions/setup-node@38d90ce44d5275ad62cc48384b3d8a58c500bb5f
uses: actions/setup-node@270253e841af726300e85d718a5f606959b2903c
with:
node-version: 16.x
cache: npm
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pa11y.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f

- name: Setup Node
uses: actions/setup-node@38d90ce44d5275ad62cc48384b3d8a58c500bb5f
uses: actions/setup-node@270253e841af726300e85d718a5f606959b2903c
with:
node-version: 16.8.x
cache: npm
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ping-staging-apps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
steps:
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
- name: Setup node
uses: actions/setup-node@38d90ce44d5275ad62cc48384b3d8a58c500bb5f
uses: actions/setup-node@270253e841af726300e85d718a5f606959b2903c
with:
node-version: 16.8.x
cache: npm
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/prod-build-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
run: git lfs checkout

- name: Setup node
uses: actions/setup-node@38d90ce44d5275ad62cc48384b3d8a58c500bb5f
uses: actions/setup-node@270253e841af726300e85d718a5f606959b2903c
with:
node-version: 16.8.x
cache: npm
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ready-for-doc-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f

- name: Setup Node
uses: actions/setup-node@38d90ce44d5275ad62cc48384b3d8a58c500bb5f
uses: actions/setup-node@270253e841af726300e85d718a5f606959b2903c
with:
node-version: 16.8.x
cache: npm
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/remove-stale-staging-resources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f

- name: Setup Node
uses: actions/setup-node@38d90ce44d5275ad62cc48384b3d8a58c500bb5f
uses: actions/setup-node@270253e841af726300e85d718a5f606959b2903c
with:
node-version: 16.8.x
cache: npm
Expand All @@ -49,7 +49,7 @@ jobs:
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f

- name: Setup Node
uses: actions/setup-node@38d90ce44d5275ad62cc48384b3d8a58c500bb5f
uses: actions/setup-node@270253e841af726300e85d718a5f606959b2903c
with:
node-version: 16.8.x
cache: npm
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/remove-unused-assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Checkout
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
- name: Setup Node
uses: actions/setup-node@38d90ce44d5275ad62cc48384b3d8a58c500bb5f
uses: actions/setup-node@270253e841af726300e85d718a5f606959b2903c
with:
node-version: 16.8.x
cache: npm
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/repo-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ jobs:

# Set up npm and run npm ci to run husky to get githooks for LFS
- name: Setup node
uses: actions/setup-node@38d90ce44d5275ad62cc48384b3d8a58c500bb5f
uses: actions/setup-node@270253e841af726300e85d718a5f606959b2903c
with:
node-version: 16.8.x
cache: npm
Expand Down Expand Up @@ -143,7 +143,7 @@ jobs:
if: ${{ steps.find-pull-request.outputs.number }}
uses: juliangruber/approve-pull-request-action@c530832d4d346c597332e20e03605aa94fa150a8
with:
github-token: ${{ secrets.DOCUBOT_REPO_PAT }}
github-token: ${{ secrets.GITHUB_TOKEN }}
number: ${{ steps.find-pull-request.outputs.number }}

# Because we get far too much spam ;_;
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/staging-build-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
run: exit 1

- name: Setup node
uses: actions/setup-node@38d90ce44d5275ad62cc48384b3d8a58c500bb5f
uses: actions/setup-node@270253e841af726300e85d718a5f606959b2903c
with:
node-version: 16.8.x
cache: npm
Expand Down
Loading

0 comments on commit 5d0d6b7

Please sign in to comment.