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
nguyenalex836 authored Feb 27, 2025
2 parents 87cd511 + 79e4c6e commit 22c2c79
Show file tree
Hide file tree
Showing 5,478 changed files with 2,506,056 additions and 2,106,926 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
18 changes: 1 addition & 17 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,21 +1,5 @@
# To find available Node images, see https://mcr.microsoft.com/en-us/product/devcontainers/javascript-node/tags

# [Choice] Node.js version
ARG VARIANT="dev-20-bullseye"
ARG VARIANT="dev-22-bullseye"
FROM mcr.microsoft.com/devcontainers/javascript-node:${VARIANT}

# [Optional] Uncomment this section to install additional OS packages.
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
# && apt-get -y install --no-install-recommends <your-package-list-here>

# [Optional] Uncomment if you want to install an additional version of node using nvm
# ARG EXTRA_NODE_VERSION=10
# RUN su node -c "source /usr/local/share/nvm/nvm.sh && nvm install ${EXTRA_NODE_VERSION}"

# [Optional] Uncomment if you want to install more global node modules
# RUN su node -c "npm install -g <your-package-list-here>"

# Install the GitHub CLI see:
# https://github.com/microsoft/vscode-dev-containers/blob/3d59f9fe37edb68f78874620f33dac5a62ef2b93/script-library/docs/github.md
COPY library-scripts/github-debian.sh /tmp/library-scripts/
RUN apt-get update && bash /tmp/library-scripts/github-debian.sh
119 changes: 61 additions & 58 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,70 +2,73 @@
// https://github.com/microsoft/vscode-dev-containers/tree/v0.177.0/containers/javascript-node
// -
{
"name": "docs.github.com",
"build": {
"dockerfile": "Dockerfile",
// Update 'VARIANT' to pick a Node version
"args": { "VARIANT": "20" }
},
"name": "docs.github.com",
"build": {
"dockerfile": "Dockerfile",
// Update 'VARIANT' to pick a Node version
"args": { "VARIANT": "22" }
},

// Install features. Type 'feature' in the VS Code command palette for a full list.
"features": {
"sshd": "latest"
},
// Install features. Type 'feature' in the VS Code command palette for a full list.
"features": {
"sshd": "latest",
"ghcr.io/devcontainers/features/github-cli:1": {}
},

"customizations": {
"vscode": {
// Set *default* container specific settings.json values on container create.
"settings": {
"terminal.integrated.shell.linux": "/bin/bash",
"cSpell.language": ",en"
},
// Visual Studio Code extensions which help authoring for docs.github.com.
"extensions": [
"dbaeumer.vscode-eslint",
"sissel.shopify-liquid",
"davidanson.vscode-markdownlint",
"bierner.markdown-preview-github-styles",
"streetsidesoftware.code-spell-checker",
"alistairchristie.open-reusables",
"AlistairChristie.version-identifier",
"peterbe.ghdocs-goer",
"GitHub.copilot",
"GitHub.copilot-chat"
]
},
"codespaces": {
"repositories": {
// allow Codespaces to pull from separate repo when user has access
"github/docs-early-access": {
"permissions": {
"contents": "write"
}
}
}
}
"customizations": {
"vscode": {
// Set *default* container specific settings.json values on container create.
"settings": {
"terminal.integrated.shell.linux": "/bin/bash",
"cSpell.language": ",en",
"git.autofetch": true
},
// Visual Studio Code extensions which help authoring for docs.github.com.
"extensions": [
"dbaeumer.vscode-eslint",
"sissel.shopify-liquid",
"davidanson.vscode-markdownlint",
"bierner.markdown-preview-github-styles",
"streetsidesoftware.code-spell-checker",
"alistairchristie.open-reusables",
"AlistairChristie.version-identifier",
"peterbe.ghdocs-goer",
"GitHub.copilot",
"GitHub.copilot-chat"
]
},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [4000],

"portsAttributes": {
"4000": {
"label": "Preview"
"codespaces": {
"repositories": {
// allow Codespaces to pull from separate repo when user has access
"github/docs-early-access": {
"permissions": {
"contents": "write"
}
}
},
}
}
},

// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "npm ci",
// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [4000],

// Use 'updateContentCommand' to run commands to be included in Codespace pre-builds
"updateContentCommand": "git clone https://github.com/github/rest-api-description.git",
"portsAttributes": {
"4000": {
"label": "Review"
}
},

// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "node",
// Lifecycle commands
"onCreateCommand": "npm ci",
"postStartCommand": "nohup bash -c 'npm start &'",
// Set the port to be public
"postAttachCommand": "gh cs ports visibility 4000:public -c \"$CODESPACE_NAME\"",

"hostRequirements": {
"memory": "8gb"
}
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "node",

"hostRequirements": {
"memory": "16gb",
"cpus": "4"
}
}
43 changes: 0 additions & 43 deletions .devcontainer/library-scripts/github-debian.sh

This file was deleted.

5 changes: 2 additions & 3 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ contributing/
docs/
node_modules/
tests/
# Folder is cloned during the preview + prod workflows, the assets are merged into other locations for use before the build
# Folder is cloned during the Dockerfile build
docs-early-access/
# During the preview deploy untrusted user code may be cloned into this directory
user-code/
README.md
28 changes: 28 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# This file is a template for what your untracked .env file might look like for local development.
# Please copy this to a new .env file and fill in the values as needed.

# Requires a running local Elasticsearch service. Can be started via Docker, see https://github.com/github/docs-engineering/blob/main/docs/elasticsearch/elasticsearch-locally.md
# When this value is unset searches will be proxied to the production Elasticsearch endpoint
ELASTICSEARCH_URL=http://localhost:9200

# Set for sending events in local development. See https://github.com/github/docs-engineering/blob/main/docs/analytics/hydro-mock.md
HYDRO_ENDPOINT=
HYDRO_SECRET=

# Localization variables
# See https://github.com/github/docs-internal/tree/main/src/languages#working-with-translated-content-locally
ENABLED_LANGUAGES=
TRANSLATIONS_ROOT=

# For running the src/search/scripts/scrape script
# You may want a lower value depending on your CPU
BUILD_RECORDS_MAX_CONCURRENT=100
BUILD_RECORDS_MIN_TIME=

# Set to true to enable the /fastly-cache-test route for debugging Fastly headers
ENABLE_FASTLY_TESTING=

# Needed to auth for AI search
CSE_COPILOT_SECRET=
CSE_COPILOT_ENDPOINT=https://cse-copilot-staging.service.iad.github.net

2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Use the table of contents icon <img alt="Table of contents icon" src="/contribut
To get an overview of the project, read the [README](../README.md) file. Here are some resources to help you get started with open source contributions:

- [Finding ways to contribute to open source on GitHub](https://docs.github.com/en/get-started/exploring-projects-on-github/finding-ways-to-contribute-to-open-source-on-github)
- [Set up Git](https://docs.github.com/en/get-started/getting-started-with-git/set-up-git)
- [Set up Git](https://docs.github.com/en/get-started/git-basics/set-up-git)
- [GitHub flow](https://docs.github.com/en/get-started/using-github/github-flow)
- [Collaborating with pull requests](https://docs.github.com/en/github/collaborating-with-pull-requests)

Expand Down
10 changes: 5 additions & 5 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Thank you for contributing to this project! You must fill out the information be

### Why:

<!-- Paste the issue link or number here -->
Closes:

<!-- If there's an existing issue for your change, please link to it above.
Expand All @@ -12,11 +13,10 @@ If there's _not_ an existing issue, please open one first to make it more likely
### What's being changed (if available, include any code snippets, screenshots, or gifs):

<!-- Let us know what you are changing. Share anything that could provide the most context.
If you made changes to the `content` directory, a table will populate in a comment below with links to the preview and current production articles. -->
If you made changes to the `content` directory, a table will populate in a comment below with links to the review and current production articles. -->

### Check off the following:

- [ ] I have reviewed my changes in staging, available via the **View deployment** link in this PR's timeline (this link will be available after opening the PR).

- For content changes, you will also see an automatically generated comment with links directly to pages you've modified. The comment won't appear if your PR only edits files in the `data` directory.
- [ ] For content changes, I have completed the [self-review checklist](https://docs.github.com/en/contributing/collaborating-on-github-docs/self-review-checklist).
- [ ] A subject matter expert (SME) has reviewed the technical accuracy of the content in this PR. In most cases, the author can be the SME. Open source contributions may require an SME review from GitHub staff.
- [ ] The changes in this PR meet [the docs fundamentals that are required for all content](http://docs.github.com/en/contributing/writing-for-github-docs/about-githubs-documentation-fundamentals).
- [ ] All CI checks are passing and the changes look good in the review environment.
2 changes: 1 addition & 1 deletion .github/actions/cache-nextjs/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ runs:
using: 'composite'
steps:
- name: Cache .next/cache
uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0
uses: actions/cache@v4
with:
path: ${{ github.workspace }}/.next/cache
# Generate a new cache whenever packages or source files change.
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/get-docs-early-access/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ runs:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
GITHUB_TOKEN: ${{ inputs.token }}
shell: bash
run: node src/early-access/scripts/what-docs-early-access-branch.js
run: npm run what-docs-early-access-branch

- name: Clone
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/labeler/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ runs:
using: 'composite'
steps:
- name: Add label to an issue or pr
run: node .github/actions/labeler/labeler.js
run: npm run labeler
shell: bash
env:
GITHUB_TOKEN: ${{ inputs.token }}
Expand Down
Loading

0 comments on commit 22c2c79

Please sign in to comment.