Skip to content

Commit 24d5f75

Browse files
Merge branch 'main' into patch-1
2 parents df107a6 + 93d20c1 commit 24d5f75

707 files changed

Lines changed: 16176 additions & 7197 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/copilot-instructions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ The bulleted points in a bullet list should always be denoted in Markdown using
1010

1111
Within Markdown files, with the exception of the `title` field in the metadata at the start of a file, **always use the Liquid syntax variables rather than text** if a variable has been defined for that text. This ensures consistency and makes it easier to update product names globally.
1212

13-
**Important**: Variables must be used in all content, including reusable content, data files, and regular articles. The only exception is the `title` field in frontmatter metadata.
13+
**Important**: Variables must be used in all content, including reusable content, data files, and regular articles. The only exceptions are the `title` field in frontmatter metadata and any file in the `content/site-policy` directory.
1414

1515
For example:
1616

Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
name: Create a PR to add an entry to the CHANGELOG.md file in this repo
2+
3+
# **What it does**: If a member of the github org posts a changelog comment, it creates a PR to update the CHANGELOG.md file.
4+
# **Why we have it**: This surfaces docs changelog details publicly.
5+
# **Who does it impact**: GitHub users and staff.
6+
7+
on:
8+
issue_comment:
9+
types: [created]
10+
workflow_dispatch:
11+
12+
permissions:
13+
contents: write
14+
pull-requests: write
15+
16+
env:
17+
CHANGELOG_FILE: CHANGELOG.md
18+
19+
jobs:
20+
docs-changelog-pr:
21+
if: ${{ github.repository == 'github/docs-internal' && github.event.issue.pull_request }}
22+
runs-on: ubuntu-latest
23+
24+
steps:
25+
- uses: actions/checkout@v4
26+
27+
- name: 'Ensure ${{ env.CHANGELOG_FILE }} exists'
28+
run: |
29+
if [ ! -f ${{ env.CHANGELOG_FILE }} ]; then
30+
echo "${{ env.CHANGELOG_FILE }} is missing at the root of the repository."
31+
exit 1
32+
fi
33+
34+
- name: Check that the user belongs to the github org
35+
id: hubber_check
36+
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea
37+
with:
38+
github-token: ${{ secrets.DOCS_BOT_PAT_BASE }}
39+
script: |
40+
try {
41+
await github.rest.teams.getMembershipForUserInOrg({
42+
org: 'github',
43+
team_slug: 'employees',
44+
username: context.payload.sender.login,
45+
});
46+
core.exportVariable('CONTINUE_WORKFLOW', 'true');
47+
} catch(err) {
48+
core.info("Workflow triggered by a comment, but the commenter is not a Hubber. Exiting.");
49+
core.exportVariable('CONTINUE_WORKFLOW', 'false');
50+
}
51+
52+
- name: Check if comment starts with '## Changelog summary'
53+
if: env.CONTINUE_WORKFLOW == 'true'
54+
id: check_summary
55+
env:
56+
COMMENT_BODY: ${{ github.event.comment.body }}
57+
run: |
58+
# Get the first line of the comment and trim the leading/trailing whitespace:
59+
FIRST_LINE=$(printf "%s\n" "$COMMENT_BODY" | head -n1 | sed 's/^[[:space:]]*//;s/[[:space:]]*$//')
60+
if [[ "$FIRST_LINE" != '## Changelog summary' ]]; then
61+
echo "FIRST_LINE=|$FIRST_LINE|"
62+
echo "The pull request comment is not a changelog summary. Exiting."
63+
echo "CONTINUE_WORKFLOW=false" >> $GITHUB_ENV
64+
fi
65+
66+
- name: Create changelog text
67+
if: env.CONTINUE_WORKFLOW == 'true'
68+
id: create_text
69+
env:
70+
COMMENT_BODY: ${{ github.event.comment.body }}
71+
run: |
72+
set -euo pipefail
73+
DATE=$(date +"**%-d %B %Y**")
74+
BODY="$(printf "%s\n" "$COMMENT_BODY" | tail -n +2)"
75+
CHANGELOG_TEXT="$(printf "%s\n" "$BODY" | awk '/^:writing_hand:/{exit} {print}')"
76+
{
77+
echo "$DATE"
78+
echo -e "$CHANGELOG_TEXT\n<hr>"
79+
} > changelog_entry.txt
80+
81+
- name: Set up git
82+
if: env.CONTINUE_WORKFLOW == 'true'
83+
run: |
84+
git config user.name "github-actions[bot]"
85+
git config user.email "github-actions[bot]@users.noreply.github.com"
86+
87+
- name: Prepare branch
88+
if: env.CONTINUE_WORKFLOW == 'true'
89+
run: |
90+
BRANCH="changelog-update-$(date +%s)"
91+
echo "BRANCH=$BRANCH" >> $GITHUB_ENV
92+
git checkout -b "$BRANCH"
93+
94+
# Insert new changelog entry after the first heading, as follows:
95+
# Print the first line of the existing CHANGELOG.md file into a `tmp` file, followed by an empty line.
96+
# Then, print the contents of `changelog_entry.txt` into the `tmp` file.
97+
# Then, print the rest of the existing CHANGELOG.md file into the `tmp` file.
98+
# Finally, replace the existing CHANGELOG.md file with the `tmp` file.
99+
awk 'NR==1{print; print ""; while ((getline line < "changelog_entry.txt") > 0) print line; next}1' CHANGELOG.md > tmp && mv tmp CHANGELOG.md
100+
101+
git add CHANGELOG.md
102+
git commit -m "Update changelog for $(head -n1 changelog_entry.txt)"
103+
git push origin "$BRANCH"
104+
105+
- name: Create a pull request
106+
if: env.CONTINUE_WORKFLOW == 'true'
107+
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea
108+
id: create_pull_request
109+
with:
110+
github-token: ${{ secrets.DOCS_BOT_PAT_BASE }}
111+
script: |
112+
const { data: pullRequest } = await github.rest.pulls.create({
113+
owner: context.repo.owner,
114+
repo: context.repo.repo,
115+
title: `Update docs changelog (for PR #${context.payload.issue.number})`,
116+
body: `### Automated docs changelog update\n\n**Purpose:** Update the <code>${{ env.CHANGELOG_FILE }}</code> file with details of a recent docs change.\n\nThis PR is an automated update, generated by the <code>create-changelog-pr.yml</code> Actions workflow as a result of a "Changelog summary" comment being added to [PR #${context.payload.issue.number}](${context.payload.issue.html_url}).\n\n**Note for reviewer**: This change to the <code>${{ env.CHANGELOG_FILE }}</code> file will be synced to the public docs site, so make sure that the content of the entry is appropriate for public consumption. If the content is wholly inappropriate for public consumption, then this PR can be closed.\n\n<details><summary>Original PR comment posted by @${context.payload.comment.user.login}, using the <code>/changelog</code> slash command:</summary>\n\n${context.payload.comment.body}</details>`,
117+
head: process.env.BRANCH,
118+
base: 'main'
119+
});
120+
121+
core.setOutput('pull-request-number', pullRequest.number);
122+
core.setOutput('pull-request-url', pullRequest.html_url);
123+
124+
- name: Add 'ready-for-doc-review' label to PR
125+
if: env.CONTINUE_WORKFLOW == 'true'
126+
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea
127+
env:
128+
# Get the number of the PR that was just created:
129+
PULL_REQUEST_NUMBER: ${{ steps.create_pull_request.outputs.pull-request-number }}
130+
with:
131+
github-token: ${{ secrets.DOCS_BOT_PAT_BASE }}
132+
script: |
133+
await github.rest.issues.addLabels({
134+
owner: context.repo.owner,
135+
repo: context.repo.repo,
136+
issue_number: Number(process.env.PULL_REQUEST_NUMBER),
137+
labels: ['ready-for-doc-review']
138+
});
139+
140+
- uses: ./.github/actions/slack-alert
141+
if: ${{ failure() && github.event_name != 'workflow_dispatch' }}
142+
with:
143+
slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }}
144+
slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }}

CHANGELOG.md

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
# Docs changelog
2+
3+
**30 June 2025**
4+
5+
Many enterprise customers want to measure the downstream impact of Copilot on their company, looking beyond leading metrics like adoption and usage.
6+
7+
Inspired by [GitHub's latest guidance](https://resources.github.com/engineering-system-success-playbook/), we've published three guides that provide usecases, training resources, and metrics to help you plan and measure your rollout to achieve real-world goals, such as increasing test coverage.
8+
9+
Get started at [Achieving your company's engineering goals with GitHub Copilot](https://docs.github.com/en/copilot/get-started/achieve-engineering-goals).
10+
11+
<hr>
12+
13+
**27 June 2025**
14+
15+
We've published a new guide about how to combine use of GitHub Copilot's agent mode with Model Context Protocol (MCP) servers to complete complex tasks through agentic "loops" - illustrated through an accessibility compliance example. The guide also discusses best practices and benefits around using these two features together. See [Enhancing Copilot agent mode with MCP](https://docs.github.com/copilot/tutorials/enhancing-copilot-agent-mode-with-mcp).
16+
17+
<hr>
18+
19+
**27 June 2025**
20+
21+
We’ve published a new set of new documentation articles designed to help users make the most of the **Dependabot metrics page** in the organization’s security overview.
22+
23+
These clear, actionable guides help users:
24+
25+
- **[View metrics for Dependabot alerts](https://docs.github.com/en/enterprise-cloud@latest/code-security/security-overview/viewing-metrics-for-dependabot-alerts)**
26+
This article is aimed at security and engineering leads who want to learn how to access and interpret key metrics, so they can quickly assess their organization’s exposure and remediation progress.
27+
28+
- **[Understand your organization’s exposure to vulnerable dependencies](https://docs.github.com/en/enterprise-cloud@latest/code-security/securing-your-organization/understanding-your-organizations-exposure-to-vulnerabilites/about-your-exposure-to-vulnerable-dependencies)**
29+
In this article, security analysts and compliance teams get a deep dive into how vulnerable dependencies are tracked and what these numbers mean for their risk landscape.
30+
31+
- **[Prioritize Dependabot alerts using metrics](https://docs.github.com/en/enterprise-cloud@latest/code-security/securing-your-organization/understanding-your-organizations-exposure-to-vulnerabilites/prioritizing-dependabot-alerts-using-metrics)**
32+
This guide provides engineering managers and remediation teams with strategies for using metrics to focus the team’s efforts where they matter most, making remediation more efficient.
33+
34+
<hr>
35+
36+
**27 June 2025**
37+
38+
We've published a new scenario-based guide for Copilot: [Learning a new programming language with GitHub Copilot](https://docs.github.com/en/copilot/tutorials/learning-a-new-programming-language-with-github-copilot).
39+
40+
This guide is for developers who are proficient with at least one programming language and want to learn an additional language. It provides information about how you can use Copilot as your personalized learning assistant. It also provides many ready-made prompts that you can use when you are learning a new programming language.
41+
42+
<hr>
43+
44+
**25 June 2025**
45+
46+
GitHub Models launched [Pay-As-You-Go billing and Bring Your Own Key support](https://github.blog/changelog/2025-06-24-github-models-now-supports-moving-beyond-free-limits/). This provides real production usage for the first time and lays the foundation for Models to scale beyond a free sandbox.
47+
48+
See [About Billing for GitHub Models](https://docs.github.com/billing/managing-billing-for-your-products/about-billing-for-github-models) and [Using your own API keys in GitHub Models](https://docs.github.com/github-models/github-models-at-scale/set-up-custom-model-integration-models-byok).
49+
50+
<hr>
51+
52+
**23 June 2025**
53+
54+
We’ve restructured our documentation around Copilot’s AI models to make it easier for users to understand, choose, and configure models across clients and plans. See [Supported AI models in Copilot](https://docs.github.com/copilot/using-github-copilot/ai-models/supported-ai-models-in-copilot) and [Choosing the right AI model for your task](https://docs.github.com/copilot/using-github-copilot/ai-models/choosing-the-right-ai-model-for-your-task).
55+
56+
<hr>
57+
58+
**18 June 2025**
59+
60+
We've published a new responsible AI article for Copilot: [Responsible use of GitHub Copilot code completion](https://docs.github.com/copilot/responsible-use-of-github-copilot-features/responsible-use-of-github-copilot-code-completion). This provides RAI transparency information for this feature of GitHub Copilot.
61+
62+
<hr>
63+
64+
**13 June 2025**
65+
66+
We've published a new article for people learning to code: [Developing your project locally](https://docs.github.com/get-started/learning-to-code/developing-your-project-locally).
67+
68+
This tutorial helps learners gain core skills needed to set up any project locally by working through an example client-side application using HTML, CSS, and JavaScript. The goal is to help new coders use GitHub tools to recognize patterns across different technologies and build confidence in their ability to set up any project locally.
69+
70+
<hr>
71+
72+
**13 June 2025**
73+
74+
To manage System for Cross-domain Identity Management (SCIM) integration with confidence, customers need to understand the different types of deprovisioning, the actions that trigger them, and their options for reinstating deprovisioned users.
75+
76+
We've published a new article to answer questions around suspending and reinstating Enterprise Managed Users, or users where SCIM is enabled on GitHub Enterprise Server: [Deprovisioning and reinstating users with SCIM](https://docs.github.com/enterprise-cloud@latest/admin/managing-iam/provisioning-user-accounts-with-scim/deprovisioning-and-reinstating-users).
77+
78+
<hr>
79+
80+
**11 June 2025**
81+
82+
We've added a new scenario-based guide for the Builder persona: [Using Copilot to explore a codebase](https://docs.github.com/copilot/tutorials/using-copilot-to-explore-a-codebase).
83+
84+
<hr>
85+
86+
**24 April 2025**
87+
88+
To help learners feel confident they are building real coding skills while using Copilot, we published [Setting up Copilot for learning to code](https://docs.github.com/get-started/learning-to-code/setting-up-copilot-for-learning-to-code).
89+
90+
This article helps learners take their first steps in coding with Copilot acting as a tutor, rather than a code completion tool. Configuring Copilot for learning emphasizes skill development and gives learners a way to use Copilot as a daily tool to foster learning and coding independence.

Dockerfile

Lines changed: 42 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# ---------------------------------------------------------------
99
# To update the sha:
1010
# https://github.com/github/gh-base-image/pkgs/container/gh-base-image%2Fgh-base-noble
11-
FROM ghcr.io/github/gh-base-image/gh-base-noble:20250619-223112-g14de19c1f AS base
11+
FROM ghcr.io/github/gh-base-image/gh-base-noble:20250625-232939-g2376d80a2 AS base
1212

1313
# Install curl for Node install and determining the early access branch
1414
# Install git for cloning docs-early-access & translations repos
@@ -54,19 +54,28 @@ RUN --mount=type=secret,id=DOCS_BOT_PAT_BASE,mode=0444 \
5454
. ./build-scripts/fetch-repos.sh
5555

5656
# -----------------------------------------
57-
# DEPENDENCIES STAGE: Install node packages
57+
# PROD_DEPS STAGE: Install production dependencies
5858
# -----------------------------------------
59-
FROM base AS dependencies
59+
FROM base AS prod_deps
6060
USER node:node
6161
WORKDIR $APP_HOME
6262

6363
# Copy what is needed to run npm ci
6464
COPY --chown=node:node package.json package-lock.json ./
6565

66-
RUN npm ci --omit=optional --registry https://registry.npmjs.org/
66+
# Install only production dependencies (skip scripts to avoid husky)
67+
RUN npm ci --omit=dev --ignore-scripts --registry https://registry.npmjs.org/
6768

6869
# -----------------------------------------
69-
# BUILD STAGE: Prepare for production stage
70+
# ALL_DEPS STAGE: Install all dependencies on top of prod deps
71+
# -----------------------------------------
72+
FROM prod_deps AS all_deps
73+
74+
# Install dev dependencies on top of production ones
75+
RUN npm ci --registry https://registry.npmjs.org/
76+
77+
# -----------------------------------------
78+
# BUILD STAGE: Build the application
7079
# -----------------------------------------
7180
FROM base AS build
7281
USER node:node
@@ -84,14 +93,27 @@ COPY --chown=node:node --from=clones $APP_HOME/assets assets/
8493
COPY --chown=node:node --from=clones $APP_HOME/content content/
8594
COPY --chown=node:node --from=clones $APP_HOME/translations translations/
8695

87-
# From the dependencies stage
88-
COPY --chown=node:node --from=dependencies $APP_HOME/node_modules node_modules/
96+
# From the all_deps stage (need dev deps for build)
97+
COPY --chown=node:node --from=all_deps $APP_HOME/node_modules node_modules/
98+
99+
# Build the application
100+
RUN npm run build
101+
102+
# -----------------------------------------
103+
# WARMUP_CACHE STAGE: Warm up remote JSON cache
104+
# -----------------------------------------
105+
FROM build AS warmup_cache
106+
107+
# Generate remote JSON cache
108+
RUN npm run warmup-remotejson
89109

90-
# Generate build files
91-
RUN npm run build \
92-
&& npm run warmup-remotejson \
93-
&& npm run precompute-pageinfo -- --max-versions 2 \
94-
&& npm prune --production
110+
# -----------------------------------------
111+
# PRECOMPUTE STAGE: Precompute page info
112+
# -----------------------------------------
113+
FROM build AS precompute_stage
114+
115+
# Generate precomputed page info
116+
RUN npm run precompute-pageinfo -- --max-versions 2
95117

96118
# -------------------------------------------------
97119
# PRODUCTION STAGE: What will run on the containers
@@ -112,13 +134,17 @@ COPY --chown=node:node --from=clones $APP_HOME/assets assets/
112134
COPY --chown=node:node --from=clones $APP_HOME/content content/
113135
COPY --chown=node:node --from=clones $APP_HOME/translations translations/
114136

115-
# From dependencies stage (*modified in build stage)
116-
COPY --chown=node:node --from=build $APP_HOME/node_modules node_modules/
137+
# From prod_deps stage (production-only node_modules)
138+
COPY --chown=node:node --from=prod_deps $APP_HOME/node_modules node_modules/
117139

118140
# From build stage
119141
COPY --chown=node:node --from=build $APP_HOME/.next .next/
120-
COPY --chown=node:node --from=build $APP_HOME/.remotejson-cache ./
121-
COPY --chown=node:node --from=build $APP_HOME/.pageinfo-cache.json.br* ./
142+
143+
# From warmup_cache stage
144+
COPY --chown=node:node --from=warmup_cache $APP_HOME/.remotejson-cache ./
145+
146+
# From precompute_stage
147+
COPY --chown=node:node --from=precompute_stage $APP_HOME/.pageinfo-cache.json.br* ./
122148

123149
# This makes it possible to set `--build-arg BUILD_SHA=abc123`
124150
# and it then becomes available as an environment variable in the docker run.
237 KB
Loading
52.5 KB
Loading
-19.7 KB
Binary file not shown.
149 KB
Loading

content/actions/about-github-actions/index.md

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)