Skip to content

Commit f7dd7c6

Browse files
Merge branch 'main' into patch-1
2 parents 468f3cb + 001c442 commit f7dd7c6

File tree

166 files changed

+5342
-1273
lines changed

Some content is hidden

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

166 files changed

+5342
-1273
lines changed

.github/actions/retry-command/action.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,17 @@ runs:
1818
steps:
1919
- name: Retry command
2020
shell: bash
21+
env:
22+
INPUT_MAX_ATTEMPTS: ${{ inputs.max_attempts }}
23+
INPUT_DELAY: ${{ inputs.delay }}
24+
INPUT_COMMAND: ${{ inputs.command }}
2125
run: |
2226
# Generic retry function: configurable attempts and delay
2327
retry_command() {
24-
local max_attempts=${{ inputs.max_attempts }}
25-
local delay=${{ inputs.delay }}
28+
local max_attempts=${INPUT_MAX_ATTEMPTS}
29+
local delay=${INPUT_DELAY}
2630
local attempt=1
27-
local command="${{ inputs.command }}"
31+
local command="${INPUT_COMMAND}"
2832
2933
while [ $attempt -le $max_attempts ]; do
3034
echo "Attempt $attempt/$max_attempts: Running command..."

.github/actions/setup-elasticsearch/action.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,18 @@ runs:
3434
- name: Pull Docker image
3535
shell: bash
3636
if: steps.cache-docker-layers.outputs.cache-hit != 'true'
37-
run: docker pull elasticsearch:${{ inputs.elasticsearch_version }}
37+
env:
38+
ES_VERSION: ${{ inputs.elasticsearch_version }}
39+
run: docker pull elasticsearch:${ES_VERSION}
3840

3941
- name: Save Docker image to cache
4042
shell: bash
4143
if: steps.cache-docker-layers.outputs.cache-hit != 'true'
44+
env:
45+
ES_VERSION: ${{ inputs.elasticsearch_version }}
4246
run: |
4347
mkdir -p /tmp/docker-cache
44-
docker save -o /tmp/docker-cache/elasticsearch.tar elasticsearch:${{ inputs.elasticsearch_version }}
48+
docker save -o /tmp/docker-cache/elasticsearch.tar elasticsearch:${ES_VERSION}
4549
4650
# Setups the Elasticsearch container
4751
# Derived from https://github.com/getong/elasticsearch-action

.github/workflows/auto-close-dependencies.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ on:
1919
- submitted
2020

2121
permissions:
22-
contents: read
22+
contents: write
2323
pull-requests: write
2424

2525
jobs:
@@ -34,12 +34,12 @@ jobs:
3434
}}
3535
runs-on: ubuntu-latest
3636
steps:
37-
- name: Close pull request
37+
- name: Close pull request and delete branch
3838
env:
3939
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4040
PR_URL: ${{ github.event.pull_request.html_url }}
4141
run: |
42-
gh pr close "$PR_URL"
42+
gh pr close "$PR_URL" --delete-branch
4343
4444
- name: Comment on the pull request
4545
env:

.github/workflows/close-on-invalid-label.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,15 @@ jobs:
2727
if: ${{ github.event_name == 'issues' }}
2828
env:
2929
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30-
run: gh issue close ${{ github.event.issue.html_url }}
30+
ISSUE_URL: ${{ github.event.issue.html_url }}
31+
run: gh issue close "$ISSUE_URL"
3132

3233
- name: Close PR
3334
if: ${{ github.event_name == 'pull_request_target' }}
3435
env:
3536
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36-
run: gh pr close ${{ github.event.pull_request.html_url }}
37+
PR_URL: ${{ github.event.pull_request.html_url }}
38+
run: gh pr close "$PR_URL"
3739

3840
- name: Check out repo
3941
if: ${{ failure() && github.event_name != 'pull_request_target' }}

.github/workflows/content-pipelines.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ on:
2222
permissions:
2323
contents: write
2424
pull-requests: write
25-
copilot-requests: write
2625

2726
env:
2827
HUSKY: 0
@@ -71,11 +70,11 @@ jobs:
7170
git config user.email "github-actions[bot]@users.noreply.github.com"
7271
7372
if git ls-remote --exit-code --heads origin "$UPDATE_BRANCH" > /dev/null 2>&1; then
74-
git fetch origin "$UPDATE_BRANCH"
73+
git fetch origin "$UPDATE_BRANCH" main
7574
git checkout "$UPDATE_BRANCH"
7675
git merge origin/main --no-edit || {
7776
echo "Merge conflict with main — resetting branch to main"
78-
git merge --abort
77+
git merge --abort 2>/dev/null || true
7978
git checkout main
8079
git branch -D "$UPDATE_BRANCH"
8180
git push origin --delete "$UPDATE_BRANCH" || true
@@ -89,6 +88,7 @@ jobs:
8988
env:
9089
GH_TOKEN: ${{ secrets.DOCS_BOT_PAT_BASE }}
9190
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
91+
COPILOT_GITHUB_TOKEN: ${{ secrets.DOCS_BOT_PAT_COPILOT }}
9292
run: npx tsx src/content-pipelines/scripts/update.ts --id "${{ matrix.id }}"
9393

9494
- name: Commit changes
@@ -131,6 +131,7 @@ jobs:
131131
PR_BODY+="Runs the \`content-pipeline-update\` agent (${PIPELINE_ID}) against the latest source docs and updates official articles under \`content/\` that have fallen out of sync."$'\n\n'
132132
PR_BODY+="## Review"$'\n\n'
133133
PR_BODY+="* Review each commit for accuracy — the agent uses AI, so spot-check important changes"$'\n'
134+
PR_BODY+="* To adjust agent behavior, see [Modifying results](${{ github.server_url }}/${{ github.repository }}/blob/main/src/content-pipelines/README.md#modifying-results)"$'\n'
134135
PR_BODY+="* Once satisfied, merge to keep docs up to date"$'\n'
135136
PR_BODY+="* A new PR will be created on the next run if there are further changes"
136137

.github/workflows/generate-code-scanning-query-lists.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ on:
2424
- .github/actions/install-cocofix/action.yml
2525

2626
permissions:
27-
contents: write
28-
pull-requests: write
27+
contents: read
2928

3029
jobs:
3130
generate-security-query-lists:
@@ -159,6 +158,9 @@ jobs:
159158
create-pull-request:
160159
if: github.repository == 'github/docs-internal'
161160
runs-on: ubuntu-latest
161+
permissions:
162+
contents: write
163+
pull-requests: write
162164
needs: [generate-security-query-lists, generate-quality-query-lists]
163165
steps:
164166
- name: Checkout repository code

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

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ on:
1717

1818
permissions:
1919
contents: read
20-
issues: write
2120

2221
jobs:
2322
# Determine which version/language combos to run
@@ -35,14 +34,18 @@ jobs:
3534
- name: Set matrix
3635
id: set-matrix
3736
run: |
38-
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
37+
if [[ "${EVENT_NAME}" == "workflow_dispatch" ]]; then
3938
# Manual run: use the provided version and language
40-
echo 'matrix={"include":[{"version":"${{ inputs.version }}","language":"${{ inputs.language }}"}]}' >> $GITHUB_OUTPUT
39+
echo "matrix={\"include\":[{\"version\":\"${INPUT_VERSION}\",\"language\":\"${INPUT_LANGUAGE}\"}]}" >> $GITHUB_OUTPUT
4140
else
4241
# Scheduled run: English free-pro-team + English latest enterprise-server
4342
LATEST_GHES=$(npx tsx -e "import { latest } from './src/versions/lib/enterprise-server-releases'; console.log(latest)")
4443
echo "matrix={\"include\":[{\"version\":\"free-pro-team@latest\",\"language\":\"en\"},{\"version\":\"enterprise-server@${LATEST_GHES}\",\"language\":\"en\"}]}" >> $GITHUB_OUTPUT
4544
fi
45+
env:
46+
EVENT_NAME: ${{ github.event_name }}
47+
INPUT_VERSION: ${{ inputs.version }}
48+
INPUT_LANGUAGE: ${{ inputs.language }}
4649

4750
- uses: ./.github/actions/slack-alert
4851
if: ${{ failure() && github.event_name != 'workflow_dispatch' }}
@@ -104,6 +107,8 @@ jobs:
104107
if: always() && github.repository == 'github/docs-internal'
105108
needs: [setup-matrix, check-internal-links]
106109
runs-on: ubuntu-latest
110+
permissions:
111+
issues: write
107112
steps:
108113
- name: Checkout
109114
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1

.github/workflows/needs-sme-workflow.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ on:
1313

1414
permissions:
1515
contents: read
16-
issues: write
17-
pull-requests: write
1816

1917
jobs:
2018
add-issue-comment:
2119
if: ${{ github.repository == 'github/docs' && (github.event.label.name == 'needs SME' && github.event_name == 'issues') }}
2220
runs-on: ubuntu-latest
21+
permissions:
22+
issues: write
2323
steps:
2424
- name: Check out repo
2525
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
@@ -39,6 +39,8 @@ jobs:
3939
add-pr-comment:
4040
if: ${{ github.repository == 'github/docs' && (github.event.label.name == 'needs SME' && github.event_name == 'pull_request_target') }}
4141
runs-on: ubuntu-latest
42+
permissions:
43+
pull-requests: write
4244
steps:
4345
- name: Check out repo
4446
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1

.github/workflows/ready-for-doc-review.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,15 @@ jobs:
3737

3838
- name: Set AUTHOR_LOGIN
3939
run: |
40-
if [[ "${{ github.event.pull_request.assignee.login && github.event.pull_request.user.login == 'docs-bot' }}" ]]; then
41-
echo "AUTHOR_LOGIN=${{ github.event.pull_request.assignee.login }}" >> $GITHUB_ENV
40+
if [[ "${IS_DOCS_BOT_ASSIGNEE}" == "true" ]]; then
41+
echo "AUTHOR_LOGIN=${ASSIGNEE_LOGIN}" >> $GITHUB_ENV
4242
else
43-
echo "AUTHOR_LOGIN=${{ github.event.pull_request.user.login }}" >> $GITHUB_ENV
43+
echo "AUTHOR_LOGIN=${USER_LOGIN}" >> $GITHUB_ENV
4444
fi
45+
env:
46+
IS_DOCS_BOT_ASSIGNEE: ${{ github.event.pull_request.assignee.login && github.event.pull_request.user.login == 'docs-bot' }}
47+
ASSIGNEE_LOGIN: ${{ github.event.pull_request.assignee.login }}
48+
USER_LOGIN: ${{ github.event.pull_request.user.login }}
4549

4650
- name: Run script
4751
run: |

.github/workflows/sync-graphql.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,15 @@ on:
1010
- cron: '20 16 * * 1-5' # Run Mon-Fri at 16:20 UTC / 8:20 PST
1111

1212
permissions:
13-
contents: write
14-
pull-requests: write
13+
contents: read
1514

1615
jobs:
1716
update_graphql_files:
1817
if: github.repository == 'github/docs-internal'
1918
runs-on: ubuntu-latest
19+
permissions:
20+
contents: write
21+
pull-requests: write
2022
outputs:
2123
ignored-changes: ${{ steps.sync.outputs.ignored-changes }}
2224
ignored-count: ${{ steps.sync.outputs.ignored-count }}

0 commit comments

Comments
 (0)