Skip to content

Commit 6003191

Browse files
authored
Merge branch 'main' into docs-circleci-pat-scopes-34238
2 parents 6628e9e + 1456def commit 6003191

File tree

186 files changed

+6913
-545
lines changed

Some content is hidden

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

186 files changed

+6913
-545
lines changed
Lines changed: 170 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,170 @@
1+
name: 'Weekly page benchmark'
2+
3+
# **What it does**: Benchmarks all pages via the article API, flags errors and slow pages
4+
# **Why we have it**: Catch perf regressions and broken pages before users hit them
5+
# **Who does it impact**: Docs engineering
6+
7+
on:
8+
workflow_dispatch:
9+
schedule:
10+
- cron: '20 16 * * 1' # Every Monday at 16:20 UTC / 8:20 PST
11+
12+
permissions:
13+
contents: read
14+
15+
jobs:
16+
benchmark:
17+
if: github.repository == 'github/docs-internal'
18+
runs-on: ubuntu-latest
19+
env:
20+
BENCHMARK_LABEL: benchmark-regression
21+
ISSUE_REPO: github/docs-engineering
22+
steps:
23+
- name: Checkout
24+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
25+
with:
26+
persist-credentials: 'false'
27+
28+
- uses: ./.github/actions/node-npm-setup
29+
30+
- name: Build
31+
run: npm run build
32+
33+
- name: Start server
34+
env:
35+
NODE_ENV: production
36+
PORT: 4000
37+
run: |
38+
npm run start-for-ci &
39+
sleep 5
40+
curl --retry-connrefused --retry 6 -I http://localhost:4000/
41+
42+
- name: Run benchmark
43+
run: |
44+
npx tsx src/workflows/benchmark-pages.ts \
45+
--versions "free-pro-team@latest,enterprise-cloud@latest,enterprise-server@latest" \
46+
--modes article-body \
47+
--slow 500 \
48+
--json /tmp/benchmark-results.json | tee /tmp/benchmark-output.txt
49+
50+
- name: Check results and create issue if needed
51+
if: always()
52+
env:
53+
GH_TOKEN: ${{ secrets.DOCS_BOT_PAT_BASE }}
54+
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
55+
run: |
56+
echo "Reading benchmark results..."
57+
ERRORS=$(jq '.errors | length' /tmp/benchmark-results.json 2>/dev/null || echo "0")
58+
SLOW=$(jq '.slow | length' /tmp/benchmark-results.json 2>/dev/null || echo "0")
59+
TOTAL=$(jq '.totalRequests' /tmp/benchmark-results.json 2>/dev/null || echo "0")
60+
P50=$(jq '.p50' /tmp/benchmark-results.json 2>/dev/null || echo "0")
61+
P99=$(jq '.p99' /tmp/benchmark-results.json 2>/dev/null || echo "0")
62+
MAX=$(jq '.max' /tmp/benchmark-results.json 2>/dev/null || echo "0")
63+
echo "Done reading results: $TOTAL pages, $ERRORS errors, $SLOW slow"
64+
65+
VERSIONS="free-pro-team@latest, enterprise-cloud@latest, enterprise-server@latest"
66+
LANGS="en"
67+
68+
if [ "$ERRORS" = "0" ] && [ "$SLOW" = "0" ]; then
69+
echo "✅ All clear — $TOTAL pages, p50=${P50}ms, p99=${P99}ms, max=${MAX}ms"
70+
71+
echo "Checking for existing open issue..."
72+
existing=$(gh issue list \
73+
--repo "$ISSUE_REPO" \
74+
--label "$BENCHMARK_LABEL" \
75+
--state open \
76+
--json number \
77+
--jq '.[0].number // empty' 2>/dev/null || true)
78+
if [ -n "$existing" ]; then
79+
echo "Closing issue #$existing..."
80+
gh issue close "$existing" \
81+
--repo "$ISSUE_REPO" \
82+
--comment "All clear as of $RUN_URL — closing."
83+
echo "Done closing issue #$existing"
84+
else
85+
echo "No existing issue to close"
86+
fi
87+
exit 0
88+
fi
89+
90+
PROBLEM_COUNT=$((ERRORS + SLOW))
91+
echo "Found $ERRORS errors and $SLOW slow pages ($PROBLEM_COUNT total problems)"
92+
93+
echo "Ensuring label exists..."
94+
gh label create "$BENCHMARK_LABEL" \
95+
--repo "$ISSUE_REPO" \
96+
--description "Weekly page benchmark found slow or errored pages" \
97+
--color "e16f24" 2>/dev/null || true
98+
echo "Done ensuring label"
99+
100+
echo "Building issue body..."
101+
BODY_FILE=/tmp/benchmark-issue-body.md
102+
{
103+
echo "## Weekly page benchmark found issues"
104+
echo ""
105+
echo "**Run:** $RUN_URL"
106+
echo "**Languages:** $LANGS"
107+
echo "**Versions:** $VERSIONS"
108+
echo "**Total pages:** $TOTAL"
109+
echo "**Stats:** p50=${P50}ms · p99=${P99}ms · max=${MAX}ms"
110+
echo "**Errors:** $ERRORS"
111+
echo "**Slow (≥500ms):** $SLOW"
112+
} > "$BODY_FILE"
113+
114+
if [ "$ERRORS" -gt 0 ]; then
115+
{
116+
echo ""
117+
echo "### Errors"
118+
echo ""
119+
echo "| Status | Mode | Path |"
120+
echo "|--------|------|------|"
121+
jq -r '.errors[] | "| \(.status) | \(.mode) | \(.path) |"' /tmp/benchmark-results.json
122+
} >> "$BODY_FILE"
123+
fi
124+
125+
if [ "$SLOW" -gt 0 ]; then
126+
{
127+
echo ""
128+
echo "### Slow pages"
129+
echo ""
130+
echo "| Time | Mode | Path |"
131+
echo "|------|------|------|"
132+
jq -r '.slow[] | "| \(.timeMs)ms | \(.mode) | \(.path) |"' /tmp/benchmark-results.json
133+
} >> "$BODY_FILE"
134+
fi
135+
echo "Done building issue body"
136+
137+
echo "Checking for existing open issue..."
138+
existing=$(gh issue list \
139+
--repo "$ISSUE_REPO" \
140+
--label "$BENCHMARK_LABEL" \
141+
--state open \
142+
--json number \
143+
--jq '.[0].number // empty' 2>/dev/null || true)
144+
145+
if [ -n "$existing" ]; then
146+
echo "Commenting on existing issue #$existing..."
147+
gh issue comment "$existing" \
148+
--repo "$ISSUE_REPO" \
149+
--body-file "$BODY_FILE"
150+
echo "Done commenting on issue #$existing"
151+
else
152+
echo "Creating new issue..."
153+
gh issue create \
154+
--repo "$ISSUE_REPO" \
155+
--label "$BENCHMARK_LABEL" \
156+
--title "[Benchmark] ${PROBLEM_COUNT} slow or errored pages detected" \
157+
--body-file "$BODY_FILE"
158+
echo "Done creating issue"
159+
fi
160+
161+
- uses: ./.github/actions/slack-alert
162+
if: ${{ failure() && github.event_name != 'workflow_dispatch' }}
163+
with:
164+
slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }}
165+
slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }}
166+
167+
- uses: ./.github/actions/create-workflow-failure-issue
168+
if: ${{ failure() && github.event_name != 'workflow_dispatch' }}
169+
with:
170+
token: ${{ secrets.DOCS_BOT_PAT_BASE }}

.github/workflows/content-pipelines.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,12 @@ jobs:
7171
git config user.email "github-actions[bot]@users.noreply.github.com"
7272
7373
if git ls-remote --exit-code --heads origin "$UPDATE_BRANCH" > /dev/null 2>&1; then
74-
git fetch origin "$UPDATE_BRANCH" main
74+
git fetch --unshallow origin "$UPDATE_BRANCH" main 2>/dev/null || git fetch origin "$UPDATE_BRANCH" main
7575
git checkout "$UPDATE_BRANCH"
7676
git merge origin/main --no-edit || {
7777
echo "Merge conflict with main — resetting branch to main"
7878
git merge --abort 2>/dev/null || true
79-
git checkout main
79+
git checkout -f main
8080
git branch -D "$UPDATE_BRANCH"
8181
if [ -z "$PR_NUMBER" ]; then
8282
git push origin --delete "$UPDATE_BRANCH" || true

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
# ---------------------------------------------------------------
1111
# To update the sha:
1212
# https://github.com/github/gh-base-image/pkgs/container/gh-base-image%2Fgh-base-noble
13-
FROM ghcr.io/github/gh-base-image/gh-base-noble:20260218-111945-g0ef8bb15f@sha256:03eb088f3581049afaf2984f917a3a9be7e5efc248049f4156cd83481579fb59 AS base
13+
FROM ghcr.io/github/gh-base-image/gh-base-noble:20260320-170214-g814cb7830@sha256:90350e63f9b56ec3f60f5ef9f51b489c4eef6462c7727e0d6729a1c8d95a4aa7 AS base
1414

1515
# Install curl for Node install and determining the early access branch
1616
# Install git for cloning docs-early-access & translations repos

content/actions/how-tos/manage-runners/larger-runners/use-custom-images.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ category:
1010
contentType: how-tos
1111
---
1212

13-
{% data reusables.actions.custom-images-public-preview-note %}
14-
1513
## Custom images
1614

1715
You can create a custom image to define the exact environment that your {% data variables.actions.github_hosted_larger_runners %} use. Custom images let you preinstall tools, dependencies, and configurations to speed up workflows and improve consistency across jobs.

content/code-security/concepts/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@ children:
1414
- supply-chain-security
1515
- /vulnerability-reporting-and-management
1616
- /security-at-scale
17+
---

content/copilot/concepts/agents/coding-agent/about-coding-agent.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ With {% data variables.copilot.copilot_coding_agent %}, {% data variables.produc
3030
* Improve test coverage
3131
* Update documentation
3232
* Address technical debt
33+
* Resolve merge conflicts
3334

3435
To delegate tasks to {% data variables.copilot.copilot_coding_agent %}, you can:
3536

content/copilot/how-tos/administer-copilot/manage-for-enterprise/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@ children:
1111
- /manage-agents
1212
- /manage-spark
1313
- /use-your-own-api-keys
14+
- /review-audit-logs
1415
redirect_from:
1516
- /copilot/managing-copilot/managing-copilot-for-your-enterprise
1617
- /copilot/how-tos/administer/enterprises
1718
- /copilot/how-tos/administer/manage-for-enterprise
1819
contentType: how-tos
1920
---
21+
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
title: Reviewing audit logs for GitHub Copilot
3+
shortTitle: Review audit logs
4+
intro: Check for changes to settings or licenses in your {% data variables.product.prodname_copilot_short %} plan.
5+
product: '{% data variables.copilot.copilot_business_short %} or {% data variables.copilot.copilot_enterprise_short %}'
6+
permissions: Enterprise owners or users with the "Read enterprise audit logs" custom role
7+
redirect_from:
8+
- /copilot/managing-copilot-for-business/reviewing-your-organization-or-enterprises-audit-logs-for-copilot-for-business
9+
- /copilot/managing-copilot-business/reviewing-your-organization-or-enterprises-audit-logs-for-copilot-business
10+
- /copilot/managing-github-copilot-in-your-organization/reviewing-your-organization-or-enterprises-audit-logs-for-copilot-business
11+
- /copilot/managing-github-copilot-in-your-organization/reviewing-audit-logs-for-copilot-business
12+
- /copilot/managing-copilot/managing-github-copilot-in-your-organization/reviewing-audit-logs-for-copilot-business
13+
- /copilot/managing-copilot/managing-github-copilot-in-your-organization/reviewing-github-copilot-activity-in-your-organization/reviewing-audit-logs-for-copilot-business
14+
- /copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-access-to-github-copilot-in-your-organization/reviewing-audit-logs-for-copilot-business
15+
- /copilot/managing-copilot/managing-github-copilot-in-your-organization/reviewing-activity-related-to-github-copilot-in-your-organization/reviewing-audit-logs-for-copilot-business
16+
- /copilot/how-tos/administer/organizations/reviewing-activity-related-to-github-copilot-in-your-organization/reviewing-audit-logs-for-copilot-business
17+
- /copilot/how-tos/administer/organizations/reviewing-activity-related-to-github-copilot-in-your-organization/review-audit-logs
18+
- /copilot/how-tos/administer/organizations/review-activity/review-audit-logs
19+
- /copilot/how-tos/administer/manage-for-organization/review-activity/review-audit-logs
20+
- /copilot/how-tos/administer-copilot/manage-for-organization/review-activity/review-audit-logs
21+
versions:
22+
feature: copilot
23+
contentType: how-tos
24+
category:
25+
- Manage Copilot for a team
26+
---
27+
28+
You can use the audit log to review actions taken in your enterprise. The audit log includes a record of:
29+
30+
* Changes to your {% data variables.product.prodname_copilot_short %} plan, such as changes to settings and policies or a user losing or receiving a license
31+
* Agent activity on the {% data variables.product.github %} website
32+
33+
The audit log does **not** include client session data, such as the prompts a user sends to {% data variables.product.prodname_copilot_short %} locally. A custom solution is required to access this data: for example, some companies use custom hooks to send {% data variables.copilot.copilot_cli_short %} events to their own logging service.
34+
35+
## Viewing your enterprise's audit logs
36+
37+
{% data reusables.enterprise-accounts.access-enterprise %}
38+
{% data reusables.enterprise-accounts.settings-tab %}
39+
{% data reusables.enterprise-accounts.audit-log-tab %}
40+
41+
## Searching audit log events
42+
43+
Use the `action:copilot` search term to view all events related to your {% data variables.product.prodname_copilot_short %} plan.
44+
45+
You can also filter by a specific event. For example, `action:copilot.cfb_seat_assignment_created` returns events related to a license being assigned to a new user. For a full list of {% data variables.product.prodname_copilot_short %} events, see [AUTOTITLE](/enterprise-cloud@latest/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/audit-log-events-for-your-enterprise#copilot) or [AUTOTITLE](/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/audit-log-events-for-your-organization#copilot).
46+
47+
To view a record of agent activity, use the `actor:Copilot` search term. See [AUTOTITLE](/copilot/reference/agentic-audit-log-events).
48+
49+
## Retaining audit log history
50+
51+
The audit log retains events for the last 180 days. We recommend streaming the audit log to a Security Information and Event Management (SIEM) platform, where you can view long-term history and set up alerts for anomalous activity. See [AUTOTITLE](/enterprise-cloud@latest/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/streaming-the-audit-log-for-your-enterprise).
52+
53+
## Further reading
54+
55+
* [AUTOTITLE](/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/reviewing-the-audit-log-for-your-organization)

content/copilot/how-tos/administer-copilot/manage-for-organization/review-activity/index.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
---
22
title: Reviewing activity related to GitHub Copilot in your organization
33
shortTitle: Review activity
4-
intro: 'Organization owners can review {% data variables.product.prodname_copilot_short %} usage in their organization.'
4+
intro: Organization owners can review {% data variables.product.prodname_copilot_short %} usage in their organization.
55
versions:
66
feature: copilot
77
children:
88
- /review-user-activity-data
9-
- /review-audit-logs
109
redirect_from:
1110
- /copilot/managing-copilot/managing-github-copilot-in-your-organization/reviewing-activity-related-to-github-copilot-in-your-organization
1211
- /copilot/how-tos/administer/organizations/reviewing-activity-related-to-github-copilot-in-your-organization

content/copilot/how-tos/administer-copilot/manage-for-organization/review-activity/review-audit-logs.md

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

0 commit comments

Comments
 (0)