Skip to content

Commit 2a84c13

Browse files
authored
Merge branch 'main' into main
2 parents 8a30e91 + 337539e commit 2a84c13

410 files changed

Lines changed: 17598 additions & 7367 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/actions/labeler/labeler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* See function main in this file for documentation */
22

3-
import coreLib from '@actions/core'
3+
import * as coreLib from '@actions/core'
44
import { type Octokit } from '@octokit/rest'
55
import { CoreInject } from '@/links/scripts/action-injections'
66

.github/instructions/all.instructions.md

Lines changed: 3 additions & 3 deletions

.github/instructions/code.instructions.md

Lines changed: 6 additions & 6 deletions

.github/workflows/check-broken-links-github-github.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,9 @@ jobs:
4444
PORT: 4000
4545
ENABLED_LANGUAGES: en
4646
run: |
47-
48-
npm run start &
47+
npm run start-for-ci &
4948
sleep 5
50-
curl --retry-connrefused --retry 3 -I http://localhost:4000/
49+
curl --retry-connrefused --retry 5 -I http://localhost:4000/
5150
5251
- name: Run broken github/github link check
5352
run: |

.github/workflows/index-general-search.yml

Lines changed: 52 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -230,21 +230,64 @@ jobs:
230230
FASTLY_SURROGATE_KEY: api-search:${{ matrix.language }}
231231
run: npm run purge-fastly-edge-cache
232232

233-
- name: Alert on scraping failures
234-
if: ${{ steps.check-failures.outputs.has_failures == 'true' && github.event_name != 'workflow_dispatch' }}
235-
uses: ./.github/actions/slack-alert
233+
- name: Upload failures artifact
234+
if: ${{ steps.check-failures.outputs.has_failures == 'true' }}
235+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
236+
with:
237+
name: search-failures-${{ matrix.language }}
238+
path: /tmp/records/failures-summary.json
239+
retention-days: 1
240+
241+
- uses: ./.github/actions/slack-alert
242+
if: ${{ failure() && github.event_name != 'workflow_dispatch' }}
236243
with:
237244
slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }}
238245
slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }}
239-
message: |
240-
:warning: ${{ steps.check-failures.outputs.failed_pages }} page(s) failed to scrape for general search indexing (language: ${{ matrix.language }})
241246

242-
The indexing completed but some pages could not be scraped. This may affect search results for those pages.
247+
notifyScrapingFailures:
248+
name: Notify scraping failures
249+
needs: updateElasticsearchIndexes
250+
if: ${{ always() && github.repository == 'github/docs-internal' && github.event_name != 'workflow_dispatch' && needs.updateElasticsearchIndexes.result != 'cancelled' }}
251+
runs-on: ubuntu-latest
252+
steps:
253+
- name: Check out repo
254+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
255+
256+
- name: Download all failure artifacts
257+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
258+
with:
259+
pattern: search-failures-*
260+
path: /tmp/failures
261+
continue-on-error: true
243262

244-
Workflow: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
263+
- name: Check if any failures were downloaded
264+
id: check-artifacts
265+
run: |
266+
if [ -d /tmp/failures ] && [ "$(ls -A /tmp/failures 2>/dev/null)" ]; then
267+
echo "has_artifacts=true" >> $GITHUB_OUTPUT
268+
else
269+
echo "has_artifacts=false" >> $GITHUB_OUTPUT
270+
fi
245271
246-
- uses: ./.github/actions/slack-alert
247-
if: ${{ failure() && github.event_name != 'workflow_dispatch' }}
272+
- uses: ./.github/actions/node-npm-setup
273+
if: ${{ steps.check-artifacts.outputs.has_artifacts == 'true' }}
274+
275+
- name: Aggregate failures and format message
276+
if: ${{ steps.check-artifacts.outputs.has_artifacts == 'true' }}
277+
id: aggregate
278+
run: |
279+
RESULT=$(npx tsx src/search/scripts/aggregate-search-index-failures.ts /tmp/failures \
280+
--workflow-url "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}")
281+
{
282+
echo 'result<<EOF'
283+
echo "$RESULT"
284+
echo 'EOF'
285+
} >> "$GITHUB_OUTPUT"
286+
287+
- name: Send consolidated Slack notification
288+
if: ${{ steps.check-artifacts.outputs.has_artifacts == 'true' }}
289+
uses: ./.github/actions/slack-alert
248290
with:
249291
slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }}
250292
slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }}
293+
message: ${{ fromJSON(steps.aggregate.outputs.result).message }}

.github/workflows/link-check-external.yml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,18 +42,30 @@ jobs:
4242
fi
4343
4444
- name: Upload report artifact
45-
if: failure()
46-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
45+
if: always()
46+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
4747
with:
4848
name: external-link-report
4949
path: artifacts/external-link-report.*
5050
retention-days: 14
51+
if-no-files-found: ignore
52+
53+
- name: Check if report exists
54+
if: always()
55+
id: check_report
56+
run: |
57+
if [ -f "artifacts/external-link-report.md" ]; then
58+
echo "has_report=true" >> $GITHUB_OUTPUT
59+
else
60+
echo "has_report=false" >> $GITHUB_OUTPUT
61+
echo "No broken link report generated - all links valid!"
62+
fi
5163
5264
- name: Create issue if broken links found
53-
if: failure()
65+
if: always() && steps.check_report.outputs.has_report == 'true'
5466
uses: peter-evans/create-issue-from-file@fca9117c27cdc29c6c4db3b86c48e4115a786710 # v5
5567
with:
56-
token: ${{ secrets.DOCS_BOT_PAT_WORKFLOW }}
68+
token: ${{ secrets.DOCS_BOT_PAT_BASE }}
5769
repository: github/docs-content
5870
title: '🌐 Broken External Links Report'
5971
content-filepath: artifacts/external-link-report.md

.github/workflows/link-check-internal.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ jobs:
7878
if: matrix.language != 'en'
7979
uses: ./.github/actions/clone-translations
8080
with:
81-
token: ${{ secrets.DOCS_BOT_PAT_READPUBLICKEY }}
81+
token: ${{ secrets.DOCS_BOT_PAT_BASE }}
8282

8383
- name: Check internal links
8484
env:
@@ -90,7 +90,7 @@ jobs:
9090

9191
- name: Upload report artifact
9292
if: always()
93-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
93+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
9494
with:
9595
name: link-report-${{ matrix.version }}-${{ matrix.language }}
9696
path: artifacts/link-report-*.md
@@ -113,7 +113,7 @@ jobs:
113113
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
114114

115115
- name: Download all artifacts
116-
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1
116+
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
117117
with:
118118
path: reports
119119
pattern: link-report-*
@@ -125,14 +125,14 @@ jobs:
125125
# Check if any reports exist
126126
if ls reports/*.md 1> /dev/null 2>&1; then
127127
echo "has_reports=true" >> $GITHUB_OUTPUT
128-
128+
129129
# Combine all markdown reports
130130
echo "# Internal Links Report" > combined-report.md
131131
echo "" >> combined-report.md
132132
echo "Generated: $(date -u +'%Y-%m-%d %H:%M UTC')" >> combined-report.md
133133
echo "[Action run](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})" >> combined-report.md
134134
echo "" >> combined-report.md
135-
135+
136136
for report in reports/*.md; do
137137
echo "---" >> combined-report.md
138138
cat "$report" >> combined-report.md
@@ -147,7 +147,7 @@ jobs:
147147
if: steps.combine.outputs.has_reports == 'true'
148148
uses: peter-evans/create-issue-from-file@fca9117c27cdc29c6c4db3b86c48e4115a786710 # v5
149149
with:
150-
token: ${{ secrets.DOCS_BOT_PAT_WORKFLOW }}
150+
token: ${{ secrets.DOCS_BOT_PAT_BASE }}
151151
repository: github/docs-content
152152
title: '🔗 Broken Internal Links Report'
153153
content-filepath: combined-report.md

.github/workflows/link-check-on-pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737

3838
- name: Get changed files
3939
id: changed-files
40-
uses: tj-actions/changed-files@48d8f15b2aaa3d255ca5af3eba4870f807ce6b3c # v45
40+
uses: tj-actions/changed-files@e0021407031f5be11a464abee9a0776171c79891 # v45
4141
with:
4242
files: |
4343
content/**/*.md

Dockerfile

Lines changed: 1 addition & 1 deletion
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:20260126-172357-g0b997f8b3@sha256:738abde0d24406108b0eb4dc3ae2b934a4d2fb08750af8b80b36c16b4ca7ad18 AS base
11+
FROM ghcr.io/github/gh-base-image/gh-base-noble:20260128-000359-ga6d0dc7c0@sha256:e2dd6aa64dc4b3fd0fee388a817b2ce0ce239f1da31fd628c359a74832abdfcb 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

LICENSE-CODE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright 2025 GitHub
3+
Copyright 2026 GitHub
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

0 commit comments

Comments
 (0)