Skip to content

Commit

Permalink
Merge branch 'main' into clarifying-information
Browse files Browse the repository at this point in the history
  • Loading branch information
CBID2 committed May 26, 2024
2 parents c33cedb + 72ab358 commit e7e8ba1
Show file tree
Hide file tree
Showing 2,340 changed files with 1,005,201 additions and 1,541,544 deletions.
2 changes: 1 addition & 1 deletion .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Community leaders will follow these Community Impact Guidelines in determining t

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within the community.

Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/improve-the-site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ body:
label: Code of Conduct
description: This project has a Code of Conduct that all participants are expected to understand and follow.
options:
- label: I have read and agree to the GitHub Docs project's [Code of Conduct](https://github.com/github/docs/blob/main/CODE_OF_CONDUCT.md)
- label: I have read and agree to the GitHub Docs project's [Code of Conduct](https://github.com/github/docs/blob/main/.github/CODE_OF_CONDUCT.md)
required: true

- type: textarea
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ body:
label: Code of Conduct
description: This project has a Code of Conduct that all participants are expected to understand and follow.
options:
- label: I have read and agree to the GitHub Docs project's [Code of Conduct](https://github.com/github/docs/blob/main/CODE_OF_CONDUCT.md)
- label: I have read and agree to the GitHub Docs project's [Code of Conduct](https://github.com/github/docs/blob/main/.github/CODE_OF_CONDUCT.md)
required: true
- type: checkboxes
attributes:
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/node-npm-setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ runs:
key: ${{ runner.os }}-node_modules-${{ hashFiles('package*.json') }}-${{ hashFiles('.github/actions/node-npm-setup/action.yml') }}

- name: Setup Node.js
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version-file: 'package.json'
cache: npm
Expand Down
6 changes: 4 additions & 2 deletions .github/branch_protection_settings/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@
"fixtures",
"frame",
"products",
"workflows"
"workflows",
"lint-code"
],
"contexts_url": "https://api.github.com/repos/github/docs-internal/branches/main/protection/required_status_checks/contexts",
"checks": [
Expand Down Expand Up @@ -79,7 +80,8 @@
{ "context": "fixtures", "app_id": 15368 },
{ "context": "frame", "app_id": 15368 },
{ "context": "products", "app_id": 15368 },
{ "context": "workflows", "app_id": 15368 }
{ "context": "workflows", "app_id": 15368 },
{ "context": "lint-code", "app_id": 15368 }
]
},
"restrictions": {
Expand Down
7 changes: 2 additions & 5 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,13 @@ updates:
schedule:
interval: weekly
day: tuesday
open-pull-requests-limit: 20 # default is 5
ignore:
# Because this is so dependent on the remote server we use
- dependency-name: '@elastic/elasticsearch'
# Because whatever we have needs to match what @primer/react also uses
- dependency-name: 'styled-components'
- dependency-name: '*'
update-types:
['version-update:semver-patch', 'version-update:semver-minor']
update-types: ['version-update:semver-patch']

- package-ecosystem: 'github-actions'
directory: '/'
Expand All @@ -22,8 +20,7 @@ updates:
day: wednesday
ignore:
- dependency-name: '*'
update-types:
['version-update:semver-patch', 'version-update:semver-minor']
update-types: ['version-update:semver-patch']

- package-ecosystem: 'docker'
directory: '/'
Expand Down
42 changes: 42 additions & 0 deletions .github/workflows/all-documents.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: All documents script

# **What it does**: Verifies that the all-documents script works.
# **Why we have it**: Code quality and sustainability.
# **Who does it impact**: docs-engineering

on:
pull_request:
paths:
- 'src/content-render/scripts/all-documents/**'
- 'package*.json'
- .github/workflows/all-documents.yml

permissions:
contents: read

jobs:
all-documents-script:
if: github.repository == 'github/docs-internal'
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- uses: ./.github/actions/node-npm-setup

- name: Run all-documents script
env:
NODE_ENV: production
run: |
echo "Help..."
npm run all-documents -- --help
echo ""
echo "Storing in a file (English only)"
npm run all-documents -- -o all-documents.json -l en
echo ""
echo "Look at the first 50 lines of the file..."
cat all-documents.json | jq | head -n 50
# We're essentially expecting it to not crash and fail.
5 changes: 2 additions & 3 deletions .github/workflows/azure-preview-env-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ jobs:
password: ${{ secrets.NONPROD_REGISTRY_PASSWORD }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226
uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb

- if: ${{ env.IS_PUBLIC_BUILD == 'true' }}
name: Check out main branch
Expand Down Expand Up @@ -192,7 +192,6 @@ jobs:
rsync -rptovR ./user-code/content/./**/*.md ./content
rsync -rptovR ./user-code/assets/./**/*.png ./assets
rsync -rptovR ./user-code/data/./**/*.{yml,md} ./data
rsync -rptovR ./user-code/src/./**/*.{scss,ts,tsx} ./src
- uses: ./.github/actions/warmup-remotejson-cache
with:
Expand All @@ -207,7 +206,7 @@ jobs:
run: src/workflows/prune-for-preview-env.sh

- name: 'Build and push image'
uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09
uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0
with:
context: .
push: true
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/azure-prod-build-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,20 @@ jobs:
password: ${{ secrets.PROD_REGISTRY_PASSWORD }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226
uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb

- name: Check out repo
# If any of the steps above fail, we'll need a checkout so we
# have access to the `.github/actions/slack-alert/action.yml` file.
if: ${{ always() && github.event_name != 'workflow_dispatch' }}
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
ref: ${{ github.sha }}
# To prevent issues with cloning early access content later
persist-credentials: 'false'

- name: Setup Node.js
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version-file: 'package.json'
cache: npm
Expand Down Expand Up @@ -87,7 +90,7 @@ jobs:
token: ${{ secrets.DOCS_BOT_PAT_READPUBLICKEY }}

- name: 'Build and push image'
uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09
uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0
with:
context: .
push: true
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/azure-staging-build-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
password: ${{ secrets.NONPROD_REGISTRY_PASSWORD }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226
uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb

- name: Check out repo
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
Expand All @@ -74,7 +74,7 @@ jobs:
echo "DOCKER_IMAGE=${{ secrets.NONPROD_REGISTRY_SERVER }}/${{ env.IMAGE_REPO }}:${{ env.COMMIT_REF }}-${{ github.run_number }}-${{ github.run_attempt }}" >> $GITHUB_ENV
- name: Setup Node.js
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version-file: 'package.json'
cache: npm
Expand All @@ -91,7 +91,7 @@ jobs:
run: src/early-access/scripts/merge-early-access.sh

- name: 'Build and push image'
uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09
uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0
with:
context: .
push: true
Expand Down
40 changes: 40 additions & 0 deletions .github/workflows/close-dangling-prs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Close dangling PRs

# **What it does**: Searches for specific PRs that have been open for a certain number of days and closes them.
# **Why we have it**: Tidying up so humans don't need to do it.
# **Who does it impact**: docs-engineering

on:
workflow_dispatch:
schedule:
- cron: '20 16 * * *' # Run every day at 16:20 UTC / 8:20 PST
pull_request:
paths:
- .github/workflows/close-dangling-prs.yml
- src/workflows/close-dangling-prs.ts

permissions:
contents: read
pull-requests: write

jobs:
close-dangling-prs:
if: github.repository == 'github/docs-internal'
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- uses: ./.github/actions/node-npm-setup

- name: Close dangling PRs
env:
GITHUB_TOKEN: ${{ secrets.DOCS_BOT_PAT_READPUBLICKEY }}
DRY_RUN: ${{ github.event_name == 'pull_request'}}
run: npm run close-dangling-prs

- uses: ./.github/actions/slack-alert
if: ${{ failure() && github.event_name == 'schedule' }}
with:
slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }}
slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }}
7 changes: 4 additions & 3 deletions .github/workflows/codeowners-docs-engineering.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,12 @@ jobs:

- name: Add Docs Engineering as a reviewer
run: |
has_reviewer=$(
needs_review=$(
gh pr view $PR --json reviews |
jq 'any(.reviews[]; select(length > 0))'
jq '.reviews |
length == 0 or all(.author.login == "${{github.event.pull_request.user.login}}")'
)
if ! $has_reviewer
if $needs_review
then
gh pr edit $PR --add-reviewer github/docs-engineering
fi
2 changes: 1 addition & 1 deletion .github/workflows/codeowners-legal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:

- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@77af4bed286740ef1a6387dc4e4e4dec39f96054 # v43.0.0
uses: tj-actions/changed-files@1754cd4b9e661d1f0eced3b33545a8d8b3bc46d8 # v44.5.0
with:
files: 'content/**'
output_renamed_files_as_deleted_and_added: true
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: github/codeql-action/init@b374143c1149a9115d881581d29b8390bbcbb59c # v3.22.11
- uses: github/codeql-action/init@b7cec7526559c32f1616476ff32d17ba4c59b2d6 # v3.25.5
with:
languages: javascript # comma separated list of values from {go, python, javascript, java, cpp, csharp, ruby}
config: |
paths-ignore:
- 'src/open-source/scripts/add-pr-links.js'
- uses: github/codeql-action/analyze@b374143c1149a9115d881581d29b8390bbcbb59c # v3.22.11
- uses: github/codeql-action/analyze@b7cec7526559c32f1616476ff32d17ba4c59b2d6 # v3.25.5
continue-on-error: true

- uses: ./.github/actions/slack-alert
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/content-changes-table-comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ on:
- synchronize
paths:
- 'content/**'
- 'data/reusables/**'

permissions:
contents: read
Expand Down Expand Up @@ -62,10 +63,10 @@ jobs:
APP_URL: ${{ env.APP_URL }}
BASE_SHA: ${{ github.event.pull_request.base.sha || inputs.BASE_SHA }}
HEAD_SHA: ${{ github.event.pull_request.head.sha || inputs.HEAD_SHA }}
run: src/workflows/content-changes-table-comment.js
run: npm run content-changes-table-comment

- name: Find content directory changes comment
uses: peter-evans/find-comment@d5fe37641ad8451bdd80312415672ba26c86575e
uses: peter-evans/find-comment@3eae4d37986fb5a8592848f6a574fdf654e61f9e
id: findComment
with:
issue-number: ${{ github.event.pull_request.number || inputs.PR_NUMBER }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/content-lint-markdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:

- name: Get changed content/data files
id: changed-files
uses: tj-actions/changed-files@77af4bed286740ef1a6387dc4e4e4dec39f96054 # v43.0.0
uses: tj-actions/changed-files@1754cd4b9e661d1f0eced3b33545a8d8b3bc46d8 # v44.5.0
with:
# No need to escape the file names because we make the output of
# tj-actions/changed-files be set as an environment variable. Not
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@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Setup Node.js
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version-file: 'package.json'
cache: npm
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dont-delete-assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:

- name: Find possible previous comment
if: ${{ steps.comment.outputs.markdown != '' }}
uses: peter-evans/find-comment@d5fe37641ad8451bdd80312415672ba26c86575e
uses: peter-evans/find-comment@3eae4d37986fb5a8592848f6a574fdf654e61f9e
id: findComment
with:
issue-number: ${{ github.event.number }}
Expand Down
Loading

0 comments on commit e7e8ba1

Please sign in to comment.