Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/sync-doc-pr-zh-to-en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ jobs:
persist-credentials: false
fetch-depth: 0

- name: Checkout ai-pr-translator repository
- name: Checkout ai-markdown-translator repository
uses: actions/checkout@v6
with:
repository: "qiancai/ai-pr-translator"
repository: "qiancai/ai-markdown-translator"
ref: "main"
path: "ai-pr-translator"
path: "ai-markdown-translator"
persist-credentials: false

- name: Set up Python
Expand All @@ -54,7 +54,7 @@ jobs:
python-version: '3.9'

- name: Install dependencies
run: pip install -r ai-pr-translator/scripts/requirements.txt
run: pip install -r ai-markdown-translator/scripts/requirements.txt

- name: Extract PR information
id: extract_info
Expand Down Expand Up @@ -185,7 +185,7 @@ jobs:
TARGET_REPO_PATH: ${{ github.workspace }}/target_repo
TERMS_PATH: ${{ github.workspace }}/target_repo/resources/terms.md
run: |
cd ai-pr-translator/scripts
cd ai-markdown-translator/scripts
if python main_workflow.py; then
echo "sync_success=true" >> $GITHUB_OUTPUT
echo "✅ Sync script completed successfully"
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/translation-cron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ env:
]
}
INDEX_FILES: _index.md,ai/_index.md,api/_index.md,best-practices/_index.md,develop/_index.md,releases/_index.md,tidb-cloud/dedicated/_index.md,tidb-cloud/essential/_index.md,tidb-cloud/premium/_index.md,tidb-cloud/releases/_index.md,tidb-cloud/starter/_index.md
AI_TRANSLATOR_REPO: qiancai/ai-pr-translator
AI_TRANSLATOR_REPO: qiancai/ai-markdown-translator
AI_TRANSLATOR_REF: main

jobs:
Expand Down Expand Up @@ -75,26 +75,26 @@ jobs:
persist-credentials: false

- uses: actions/checkout@v6
name: Checkout ai-pr-translator
name: Checkout ai-markdown-translator
with:
repository: ${{ env.AI_TRANSLATOR_REPO }}
ref: ${{ env.AI_TRANSLATOR_REF }}
path: ai-pr-translator
path: ai-markdown-translator
persist-credentials: false

- uses: actions/setup-python@v6

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🌐 Web query:

What are the latest major versions of actions/setup-python and actions/checkout?

💡 Result:

As of July 19, 2026, the latest major versions for these GitHub Actions are: - actions/checkout: v7 [1][2][3] - actions/setup-python: v6 [4][5][6] The actions/checkout action released version v7.0.0 on June 18, 2026 [2][7]. The actions/setup-python action is currently at major version v6 [4][6].

Citations:


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf 'Workflow action references:\n'
rg -n 'uses: actions/(checkout|setup-python)@' .github/workflows/translation-cron.yml .github/workflows/sync-doc-pr-zh-to-en.yml .github/workflows/translation-zh.yaml

printf '\nFull surrounding context:\n'
for f in .github/workflows/translation-cron.yml .github/workflows/sync-doc-pr-zh-to-en.yml .github/workflows/translation-zh.yaml; do
  echo "---- $f ----"
  sed -n '1,140p' "$f" | nl -ba | sed -n '1,140p' | rg -n 'actions/(checkout|setup-python)@|uses:|name:'
done

Repository: pingcap/docs

Length of output: 1298


🌐 Web query:

GitHub Actions actions/checkout current major version release and actions/setup-python current major version release

💡 Result:

As of July 19, 2026, the current major version releases for the specified GitHub Actions are: 1. actions/checkout: The current major version is v7 [1][2][3]. 2. actions/setup-python: The current major version is v6 [4][5]. Note: For actions/checkout, version v7.0.0 was released on June 18, 2026 [2]. For actions/setup-python, the v6 series (with the latest release being v6.3.0 as of the most recent data) remains the current major version [5].

Citations:


Bump actions/checkout to v7; actions/setup-python@v6 is already current.
The checkout refs in .github/workflows/translation-cron.yml, .github/workflows/sync-doc-pr-zh-to-en.yml, and .github/workflows/translation-zh.yaml are still on v6. Pin these action refs to SHAs if you want supply-chain hardening.

🧰 Tools
🪛 zizmor (1.26.1)

[error] 85-85: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)

📍 Affects 3 files
  • .github/workflows/translation-cron.yml#L85-L85 (this comment)
  • .github/workflows/sync-doc-pr-zh-to-en.yml#L44-L44
  • .github/workflows/translation-zh.yaml#L76-L76
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/translation-cron.yml at line 85, Update the
actions/checkout references from v6 to v7 in
.github/workflows/translation-cron.yml (line 85),
.github/workflows/sync-doc-pr-zh-to-en.yml (line 44), and
.github/workflows/translation-zh.yaml (line 76); leave actions/setup-python@v6
unchanged. Optionally pin the checkout refs to SHAs for supply-chain hardening.

Source: Linters/SAST tools

name: Setup Python
with:
python-version: "3.9"
cache: pip
cache-dependency-path: ai-pr-translator/scripts/requirements.txt
cache-dependency-path: ai-markdown-translator/scripts/requirements.txt

- name: Install Python dependencies
shell: bash
run: |
set -euo pipefail
python -m pip install --upgrade pip
pip install -r ai-pr-translator/scripts/requirements.txt
pip install -r ai-markdown-translator/scripts/requirements.txt

- name: Resolve commit range
id: commits
Expand Down Expand Up @@ -142,7 +142,7 @@ jobs:
INDEX_FILES: ${{ env.INDEX_FILES }}
run: |
set -euo pipefail
python ai-pr-translator/scripts/resolve_cloud_source_files.py
python ai-markdown-translator/scripts/resolve_cloud_source_files.py

- name: Run commit sync workflow
id: sync
Expand Down Expand Up @@ -174,7 +174,7 @@ jobs:
FAIL_ON_TRANSLATION_ERROR: "true"
run: |
set -euo pipefail
cd ai-pr-translator/scripts
cd ai-markdown-translator/scripts
python commit_sync_workflow.py

- name: Post-process translated TOCs
Expand Down Expand Up @@ -243,7 +243,7 @@ jobs:
env:
HEAD_REF: ${{ steps.commits.outputs.head_ref }}
SOURCE_BRANCH: ${{ env.SOURCE_BRANCH }}
FAILURE_REPORT: ${{ github.workspace }}/ai-pr-translator/scripts/temp_output/translation-failures.md
FAILURE_REPORT: ${{ github.workspace }}/ai-markdown-translator/scripts/temp_output/translation-failures.md
run: |
set -euo pipefail

Expand Down Expand Up @@ -294,7 +294,7 @@ jobs:
body: |
### What is changed, added or deleted? (Required)

Translate documentation changes from `pingcap/docs` `${{ env.SOURCE_BRANCH }}` to Japanese via `ai-pr-translator` commit-diff sync.
Translate documentation changes from `pingcap/docs` `${{ env.SOURCE_BRANCH }}` to Japanese via `ai-markdown-translator` commit-diff sync.

English commit diff:

Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/translation-zh.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ env:
CN_CLOUD_BRANCH: i18n-zh-release-8.5
CLOUD_TOC_FILES: TOC-tidb-cloud.md,TOC-tidb-cloud-starter.md,TOC-tidb-cloud-essential.md,TOC-tidb-cloud-premium.md,TOC-tidb-cloud-releases.md
CLOUD_INDEX_FILES: tidb-cloud/dedicated/_index.md,tidb-cloud/essential/_index.md,tidb-cloud/premium/_index.md,tidb-cloud/releases/_index.md,tidb-cloud/starter/_index.md
AI_TRANSLATOR_REPO: qiancai/ai-pr-translator
AI_TRANSLATOR_REPO: qiancai/ai-markdown-translator
AI_TRANSLATOR_REF: main

jobs:
Expand Down Expand Up @@ -66,26 +66,26 @@ jobs:
persist-credentials: false

- uses: actions/checkout@v6
name: Checkout ai-pr-translator
name: Checkout ai-markdown-translator
with:
repository: ${{ env.AI_TRANSLATOR_REPO }}
ref: ${{ env.AI_TRANSLATOR_REF }}
path: ai-pr-translator
path: ai-markdown-translator
persist-credentials: false

- uses: actions/setup-python@v6
name: Setup Python
with:
python-version: "3.9"
cache: pip
cache-dependency-path: ai-pr-translator/scripts/requirements.txt
cache-dependency-path: ai-markdown-translator/scripts/requirements.txt

- name: Install Python dependencies
shell: bash
run: |
set -euo pipefail
python -m pip install --upgrade pip
pip install -r ai-pr-translator/scripts/requirements.txt
pip install -r ai-markdown-translator/scripts/requirements.txt

- name: Resolve commit range
id: commits
Expand Down Expand Up @@ -133,7 +133,7 @@ jobs:
CLOUD_INDEX_FILES: ${{ env.CLOUD_INDEX_FILES }}
run: |
set -euo pipefail
python ai-pr-translator/scripts/resolve_cloud_source_files.py
python ai-markdown-translator/scripts/resolve_cloud_source_files.py

- name: Run commit sync workflow
id: sync
Expand Down Expand Up @@ -166,7 +166,7 @@ jobs:
SKIP_TRANSLATING_AI_DOCS_TO_ZH: "true"
run: |
set -euo pipefail
cd ai-pr-translator/scripts
cd ai-markdown-translator/scripts
python commit_sync_workflow.py

- name: Prepare translated changes
Expand All @@ -177,7 +177,7 @@ jobs:
env:
HEAD_REF: ${{ steps.commits.outputs.head_ref }}
SOURCE_BRANCH: ${{ env.SOURCE_BRANCH }}
FAILURE_REPORT: ${{ github.workspace }}/ai-pr-translator/scripts/temp_output/translation-failures.md
FAILURE_REPORT: ${{ github.workspace }}/ai-markdown-translator/scripts/temp_output/translation-failures.md
run: |
set -euo pipefail

Expand Down Expand Up @@ -226,7 +226,7 @@ jobs:
body: |
### What is changed, added or deleted? (Required)

Translate Cloud documentation changes from `pingcap/docs` `${{ env.SOURCE_BRANCH }}` to Chinese via `ai-pr-translator` commit-diff sync.
Translate Cloud documentation changes from `pingcap/docs` `${{ env.SOURCE_BRANCH }}` to Chinese via `ai-markdown-translator` commit-diff sync.

English commit diff:

Expand Down