Skip to content

Commit

Permalink
Merge branch 'github:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
Amdahl563 committed Apr 24, 2024
2 parents 5f8330e + a843d57 commit bfef255
Show file tree
Hide file tree
Showing 681 changed files with 48,747 additions and 31,207 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
4 changes: 1 addition & 3 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 Down
2 changes: 1 addition & 1 deletion .github/workflows/azure-prod-build-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
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
2 changes: 1 addition & 1 deletion .github/workflows/azure-staging-build-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 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 }}
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@635f118699dd888d737c15018cd30aff2e0274f8 # v44.0.1
with:
files: 'content/**'
output_renamed_files_as_deleted_and_added: true
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@635f118699dd888d737c15018cd30aff2e0274f8 # v44.0.1
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
65 changes: 65 additions & 0 deletions .github/workflows/dont-delete-features.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Don't delete features

# **What it does**:
# If the PR (against main) involves deletion of features, if any of
# them are deletions or renames, post a comment, and ultimately
# fail the check.
# **Why we have it**:
# If you delete the reference to an image, the English content is fine
# because it no longer tries to use the feature that doesn't exist.
# But this is not the case for translations.
# **Who does it impact**: Docs content.

on:
workflow_dispatch:
pull_request:
branches:
- main
paths:
- 'data/features/**'

permissions:
contents: read
pull-requests: write

jobs:
dont-delete-features:
# It's 'docs-bot' that creates those PR from "Delete orphaned features"
if: github.event.pull_request.user.login != 'docs-bot' && (github.repository == 'github/docs-internal' || github.repository == 'github/docs')
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

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

- name: Get comment markdown
id: comment
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npm run deleted-features-pr-comment

- name: Find possible previous comment
if: ${{ steps.comment.outputs.markdown != '' }}
uses: peter-evans/find-comment@d5fe37641ad8451bdd80312415672ba26c86575e
id: findComment
with:
issue-number: ${{ github.event.number }}
comment-author: 'github-actions[bot]'
body-includes: '<!-- DELETED_FEATURES -->'

- name: Update comment
if: ${{ steps.comment.outputs.markdown != '' }}
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043
with:
comment-id: ${{ steps.findComment.outputs.comment-id }}
issue-number: ${{ github.event.number }}
body: ${{ steps.comment.outputs.markdown }}
edit-mode: replace

- name: Ultimately fail the workflow for attention
if: ${{ steps.comment.outputs.markdown != '' }}
run: |
echo "More than 1 feature was deleted as part of this PR."
echo "See posted PR commented about how to get them back."
exit 1
2 changes: 1 addition & 1 deletion .github/workflows/enterprise-dates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:

- name: Create pull request
id: create-pull-request
uses: peter-evans/create-pull-request@b1ddad2c994a25fbc81a28b3ec0e368bb2021c50 # pin @v6.0.0
uses: peter-evans/create-pull-request@70a41aba780001da0a30141984ae2a0c95d8704e # pin @v6.0.2
env:
# Disable pre-commit hooks; they don't play nicely here
HUSKY: '0'
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/generate-code-scanning-query-lists.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,20 @@ jobs:
with:
token: ${{ secrets.DOCS_BOT_PAT_WORKFLOW }}

- name: Lint the code (eslint)
if: ${{ github.event_name == 'pull_request' }}
env:
PATH: '$PATH:${{ github.workspace }}/node_modules/.bin'
run: |
eslint --no-ignore src/code-scanning/scripts/generate-code-scanning-query-list.ts
- name: Lint the code (tsc)
if: ${{ github.event_name == 'pull_request' }}
env:
PATH: '$PATH:${{ github.workspace }}/node_modules/.bin'
run: |
tsc --noEmit --project src/code-scanning/scripts/tsconfig.json
- name: Build code scanning query list
run: |
for lang in "cpp" "csharp" "go" "java" "javascript" "python" "ruby" "swift"; do
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/headless-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Headless Tests

# **What it does**: This runs our browser tests to test things that depend
# on client-side JavaScript.
# **Why we have it**: Because most automated jest tests only test static
# **Why we have it**: Because most automated vitest tests only test static
# input and outputs.
# **Who does it impact**: Docs engineering, open-source engineering contributors.

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/link-check-on-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ jobs:
SHOULD_COMMENT: ${{ secrets.DOCS_BOT_PAT_WRITEORG_PROJECT != '' }}
CHECK_EXTERNAL_LINKS: false
CREATE_REPORT: false
CHECK_ANCHORS: true
# Not strictly necessary bit it makes warmServer() a bit faster
# because it only bothers with English to begin with, which
# we're filtering on anyway once the list of all pages has
Expand Down
18 changes: 1 addition & 17 deletions .github/workflows/lint-code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,8 @@ name: Lint code

on:
workflow_dispatch:
merge_group:
pull_request:
paths:
- '**.js'
- '**.mjs'
- '**.ts'
- '**.tsx'
- '**.yaml'
- '**.yml'
- '**.scss'
- .eslintrc.cjs
# In case something like eslint or tsc or prettier upgrades
- 'package-lock.json'
# In case one of the script definitions changed
- 'package.json'

permissions:
contents: read
Expand All @@ -39,10 +27,6 @@ jobs:

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

- uses: ./.github/actions/install-cocofix
with:
token: ${{ secrets.DOCS_BOT_PAT_WORKFLOW }}

- name: Run linter
run: npm run lint

Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/local-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ jobs:
- name: Install dependencies
run: npm install

- uses: ./.github/actions/get-docs-early-access
if: ${{ github.repository == 'github/docs-internal' }}
with:
token: ${{ secrets.DOCS_BOT_PAT_READPUBLICKEY }}

# Note that we don't check out docs-early-access, Elasticsearch,
# or any remote translations. Nothing fancy here!

Expand All @@ -42,6 +47,7 @@ jobs:
# tests not exiting at the end with a non-zero. Otherwise,
# by default failures are marked as "flaky" instead of "failed".
PLAYWRIGHT_RETRIES: 0
TEST_EARLY_ACCESS: ${{ github.repository == 'github/docs-internal' }}
run: npm run playwright-test -- playwright-local-dev

- name: Start server in the background
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 @@ -48,7 +48,7 @@ jobs:
exit 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/package-lock-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,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/ready-for-doc-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
token: ${{ secrets.DOCS_BOT_PAT_WRITEORG_PROJECT }}

- 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/sync-graphql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
src/graphql/scripts/sync.js
- name: Create pull request
id: create-pull-request
uses: peter-evans/create-pull-request@b1ddad2c994a25fbc81a28b3ec0e368bb2021c50 # pin @v6.0.0
uses: peter-evans/create-pull-request@70a41aba780001da0a30141984ae2a0c95d8704e # pin @v6.0.2
env:
# Disable pre-commit hooks; they don't play nicely here
HUSKY: '0'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-changed-content.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Test changed content

# **What it does**: Runs the jest tests for changed and deleted content files.
# **What it does**: Runs the vitest tests for changed and deleted content files.
# **Why we have it**: Use GitHub Actions to run tests on changed content files.
# **Who does it impact**: Docs engineering, open-source engineering contributors.

Expand Down Expand Up @@ -45,7 +45,7 @@ jobs:

- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@77af4bed286740ef1a6387dc4e4e4dec39f96054 # v43.0.0
uses: tj-actions/changed-files@635f118699dd888d737c15018cd30aff2e0274f8 # v44.0.1
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
3 changes: 2 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ concurrency:
cancel-in-progress: true

env:
# Setting this will activate the jest tests that depend on actually
# Setting this will activate the vitest tests that depend on actually
# sending real search queries to Elasticsearch
ELASTICSEARCH_URL: http://localhost:9200/

Expand Down Expand Up @@ -72,6 +72,7 @@ jobs:
- rest
- search
- shielding
- tracking
# - tests
# - tools
- versions
Expand Down
Loading

0 comments on commit bfef255

Please sign in to comment.