You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Which TiDB version(s) do your changes apply to? (Required)
Tips for choosing the affected version(s):
By default, CHOOSE MASTER ONLY so your changes will be applied to the next TiDB major or minor releases. If your PR involves a product feature behavior change or a compatibility change, CHOOSE THE AFFECTED RELEASE BRANCH(ES) AND MASTER.
Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all
It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.
Several GitHub Actions workflows now use the pinned shared authorization workflow to gate privileged jobs. The workflow test now expects link.yaml to use the local authorization workflow and the other listed workflows to use the pinned shared workflow.
Changes: Privileged workflow authorization
Layer / File(s)
Summary
Authorization gates and test .github/workflows/doc_review.yml, .github/workflows/sync-cloud-zh-toc.yml, .github/workflows/sync-doc-pr-zh-to-en.yml, .github/workflows/translation-cron.yml, .github/workflows/translation-zh.yaml, scripts/test-privileged-workflow-actors.py
Four workflows add authorization jobs and gate their work on the authorization output matching the current run attempt. A fifth workflow switches to the pinned shared authorization workflow. The test checks the expected local or pinned workflow reference.
pingcap/docs#24696: Adds authorization gates to translation and Chinese-to-English sync workflows, which this PR also changes.
pingcap/docs#24688: Changes the Cloud TOC sync workflow’s run and checkout behavior, which relates to the workflow changed here.
Suggested reviewers:shhdgit
Merge Risk: High · up to e96f3
The change does not yet bind the AI review, translation and TOC sync jobs to the new environments. Once repository-level secrets are removed as planned, these jobs would run without their credentials and fail. Add the environment bindings before merging or cutting over secrets.
Pre-merge checks: 4
Check name
Status
Explanation
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Title check
The title "ci: remove obsolete Cloud ZH TOC sync" matches the PR description, which states it removes the obsolete Cloud ZH TOC sync workflow. It is short, specific, and identifies the primary change.…
Description check
The description follows the repository template. It includes the change summary (removing the obsolete Cloud ZH TOC sync workflow), the affected version (master only), the related reference link, the …
Full details: Title check
Explanation
The title "ci: remove obsolete Cloud ZH TOC sync" matches the PR description, which states it removes the obsolete Cloud ZH TOC sync workflow. It is short, specific, and identifies the primary change. The raw summary describes edits to authorization and allowlist conditions across several workflows, which the title does not mention. That gap is an aspect of the title, not a mismatch.
Full details: Description check
Explanation
The description follows the repository template. It includes the change summary (removing the obsolete Cloud ZH TOC sync workflow), the affected version (master only), the related reference link, the AI agent involvement section, and the delete-files checkbox. The first-time contributor checklist is omitted, which is acceptable because it is optional for the author. The description does not explain why the workflow is obsolete. It also does not mention the authorization and allowlist changes described in the raw summary, which the PR objectives reference.
Finishing Touches
Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
The security boundary depends on settings outside the diff, requiring maintainer verification of master-only/no-tag policies, secret migration and revocation, unattended scheduled runs, and rejection of disallowed refs.
No open issues 🎉
What changed in this PR
This PR binds credential-consuming AI workflows to dedicated GitHub Actions environments, enabling environment-level secret restrictions while preserving existing triggers, authorization checks, and translation branches.
Changes:
Adds environment bindings for AI review, translation, and Cloud TOC synchronization jobs.
Adds regression checks for the bindings and verifies authorization jobs remain outside credential environments.
Documents the required environment setup and credential migration before merging; these settings are not provisioned by the code changes.
File
Description
scripts/test-privileged-workflow-actors.py
Tests credential environment bindings and authorization-job separation.
.github/workflows/translation-zh.yaml
Binds Chinese translation to ai-doc-translation.
.github/workflows/translation-cron.yml
Binds scheduled Japanese translation to ai-doc-translation.
.github/workflows/sync-doc-pr-zh-to-en.yml
Binds Chinese-to-English synchronization to ai-doc-translation.
.github/workflows/sync-cloud-zh-toc.yml
Binds Cloud TOC synchronization to cloud-toc-sync.
ti-chi-botBot
added
size/XS
Denotes a PR that changes 0-9 lines, ignoring generated files.
and removed
size/S
Denotes a PR that changes 10-29 lines, ignoring generated files.
labels
Nov 17, 2026
ti-chi-botBot
added
size/L
Denotes a PR that changes 100-499 lines, ignoring generated files.
and removed
size/XS
Denotes a PR that changes 0-9 lines, ignoring generated files.
labels
Nov 17, 2026
lilin90
changed the title
ci: scope AI workflow secrets to environments
ci: pin privileged workflow authorization
Nov 17, 2026
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 4
Caution
Some comments are outside the diff and can’t be posted inline due to GitHub limitations.
⚠️ Outside diff range comments (1)
Major · Bind sync-docs to the migrated translation environment. · sync-doc-pr-zh-to-en.yml:31
.github/workflows/sync-doc-pr-zh-to-en.yml:31 Major · Functional Correctness · Quick win
Bind sync-docs to the migrated translation environment.
This job also consumes AZURE_OPENAI_KEY and AZURE_OPENAI_BASE_URL, but has no environment binding. Removing their repository and organization copies also removes this job's credential access. Add environment: ai-doc-translation to sync-docs before the shared credential cutover. (raw.githubusercontent.com)
Reviewing files that changed from the base of the PR and between d9c5c1b and e96f336.
Files selected for processing: 6
.github/workflows/doc_review.yml
.github/workflows/sync-cloud-zh-toc.yml
.github/workflows/sync-doc-pr-zh-to-en.yml
.github/workflows/translation-cron.yml
.github/workflows/translation-zh.yaml
scripts/test-privileged-workflow-actors.py
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
approvedlgtmONCALLRelates to documentation oncall.size/LDenotes a PR that changes 100-499 lines, ignoring generated files.translation/from-docs-cnThis PR is translated from a PR in pingcap/docs-cn.
2 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is changed, added, or deleted? (Required)
Remove the obsolete Cloud ZH TOC sync workflow.
Which TiDB version(s) do your changes apply to? (Required)
Tips for choosing the affected version(s):
By default, CHOOSE MASTER ONLY so your changes will be applied to the next TiDB major or minor releases. If your PR involves a product feature behavior change or a compatibility change, CHOOSE THE AFFECTED RELEASE BRANCH(ES) AND MASTER.
For details, see tips for choosing the affected versions.
What is the related PR or file link(s)?
AI agent involvement
Do your changes match any of the following descriptions?