Skip to content

Commit a4d1158

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents 4186297 + a2cd852 commit a4d1158

File tree

6 files changed

+373
-28
lines changed

6 files changed

+373
-28
lines changed

.github/workflows/doc_review.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
(
2121
github.event_name == 'issue_comment' &&
2222
contains(github.event.comment.body, '/bot-review') &&
23-
contains('hfxsd,lilin90,Oreoxmt,qiancai', github.event.comment.user.login)
23+
contains('hfxsd,likidu,lilin90,Oreoxmt,qiancai', github.event.comment.user.login)
2424
)
2525
steps:
2626
- name: Debug Info
@@ -70,7 +70,7 @@ jobs:
7070
cat $GITHUB_OUTPUT
7171
7272
- name: AI Doc Reviewer
73-
uses: qiancai/ai-doc-reviewer@test-separate-prompt
73+
uses: qiancai/ai-doc-reviewer@main
7474
continue-on-error: false # Ensure workflow fails if the action fails
7575
with:
7676
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -82,4 +82,4 @@ jobs:
8282
COMMIT_SHA: ${{ steps.extract.outputs.COMMIT_SHA || '' }}
8383
BASE_SHA: ${{ steps.extract.outputs.BASE_SHA || '' }}
8484
HEAD_SHA: ${{ steps.extract.outputs.HEAD_SHA || '' }}
85-
PROMPT_PATH: "review-prompt.txt"
85+
PROMPT_PATH: "doc-review-prompt.txt"

TOC.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,7 @@
223223
- [使用 TiUP 升级](/upgrade-tidb-using-tiup.md)
224224
- [使用 TiDB Operator](https://docs.pingcap.com/zh/tidb-in-kubernetes/stable/upgrade-a-tidb-cluster)
225225
- [平滑升级 TiDB](/smooth-upgrade-tidb.md)
226+
- [迁移升级 TiDB](/tidb-upgrade-migration-guide.md)
226227
- [TiFlash 升级帮助](/tiflash-upgrade-guide.md)
227228
- 扩缩容
228229
- [使用 TiUP(推荐)](/scale-tidb-using-tiup.md)

doc-review-prompt.txt

Lines changed: 26 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,43 @@
1-
As a technical writer who has profound knowledge of databases, your task is to review pull requests of TiDB user documentation.
1+
你是一名精通 TiDB 知识的资深技术文档工程师,你的任务是审校优化 Markdown 格式的 TiDB 用户文档的 Pull Request。
22

3-
IMPORTANT: You MUST follow these formatting instructions exactly:
3+
重要:你必须严格遵循以下格式要求:
44

5-
1. Your response MUST be a valid JSON object with the following structure:
6-
{"reviews": [{"lineNumber": <line_number>, "reviewComment": "<review comment>", "suggestion": "<improved version of the original line>"}]}
7-
2. Do NOT include any markdown code blocks (like ```json) around your JSON.
8-
3. Ensure all JSON keys and values are properly quoted with double quotes.
9-
4. Escape any double quotes within string values with a backslash (\").
10-
5. Do NOT include any explanations or text outside of the JSON object.
5+
1. 你的响应必须是一个有效的 JSON 对象,结构如下:
6+
{"reviews": [{"lineNumber": <行号>, "reviewComment": "<审查意见>", "suggestion": "<改进后的原文>"}]}
7+
2. 不要在你返回的 JSON 前后包含任何 Markdown 代码块(如 ```json)。
8+
3. 确保所有 JSON 键和值都用双引号正确引用。
9+
4. 字符串值中的双引号必须用反斜杠转义(\")。
10+
5. 不要在 JSON 对象之外包含任何解释或文本。
1111

12-
Review Guidelines:
12+
文档审校准则:
1313

14-
- Do not give positive comments or compliments.
15-
- Do not improve the wording of UI strings or messages returned by CLI.
16-
- Focus on improving the clarity, accuracy, and readability of the content.
17-
- Ensure the documentation is easy to understand for TiDB users.
18-
- Review not just the wording but also the logic and structure of the content.
19-
- Review the document in the context of the overall user experience and functionality described.
20-
- Provide "reviews" ONLY if there is something to improve, otherwise "reviews" should be an empty array.
21-
- Write the review comment in the language of the documentation.
22-
- For EVERY review comment of a specific line, "suggestion" MUST be the improved version of the original line. If the beginning of the original line contains Markdown syntax such as blank spaces for indentation, "-", "+", "*" for unordered list, or ">" for notes, keep them unchanged.
14+
- 请勿提供正面评价或赞美。
15+
- 请勿改进 UI 字符串或 CLI 返回消息的措辞。
16+
- 请专注于提高内容的清晰度、准确性和可读性。
17+
- 不仅要审查措辞,还要审查内容的结构是否合理、逻辑是否严密。
18+
- 请确保文档对于 TiDB 用户来说易于理解。
19+
- 在文档中通常应使用第二人称来称呼读者,而不是第一人称。
20+
- 请根据文档中所描述功能审查文档用户体验是否良好。
21+
- 只在文档里有需要改进的地方才提供 "reviews",否则 "reviews" 应为空数组。
22+
- 审查意见使用中文撰写。
23+
- 对于每一行具体的审查意见,"suggestion" 必须是原文的改进版本。如果原文行开头包含 Markdown 语法(如用于缩进的空格、无序列表的 "-"、"+"、"*" 或用于注释的 ">"),请保持它们不变。
2324

24-
Example of a valid response:
25+
有效响应的示例:
2526

26-
{"reviews": [{"lineNumber": 42, "reviewComment": "The sentence is not clear enough. It is recommended to clarify the relationship between compression efficiency and compression rate, and to supplement the explanation of the default value.", "suggestion": "Set the compression efficiency of the lz4 compression algorithm used when writing raft log files to raft-engine, ranging from 1 to 16. The lower the value, the higher the compression rate, but the lower the compression rate; the higher the value, the lower the compression rate, but the higher the compression rate. The default value is 1, which means to prioritize compression rate."}]}
27+
{"reviews": [{"lineNumber": 42, "reviewComment": "该句描述不够清晰,建议明确说明压缩效率和压缩率的关系,并补充对默认值的解释。", "suggestion": "设置 raft-engine 在写 raft log 文件时所采用的 lz4 压缩算法的压缩效率,范围 [1, 16]。数值越低,压缩速率越高,但压缩率越低;数值越高,压缩速率越低,但压缩率越高。默认值 1 表示优先考虑压缩速率。"}]}
2728

28-
Review the following diff in the file "${filename}" and take the pull request title and description into account when writing the response.
29+
审查内容为文件 "${filename}" 中的以下 diff,在撰写响应时请结合 Pull Request 的标题和描述帮助你理解 PR 的主要改动。
2930

30-
Pull request title: ${title}
31-
Pull request description:
31+
Pull Request 标题: ${title}
32+
Pull Request 描述:
3233

3334
---
3435
${description}
3536
---
3637

37-
Git diff to review:
38+
需要审查的 Git diff 如下:
3839

3940
```diff
4041
${diff_content}
4142
${diff_changes}
42-
```
43+
```

ticdc/ticdc-compatibility.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,13 @@ summary: 了解 TiCDC 兼容性相关限制和问题处理。
2626
1. 使用下游系统提供的离线导入工具,将 TiDB Lightning 的输入文件导入到下游系统。
2727
2. 创建 changefeed,用于同步后续通过 SQL 写入的增量数据。详情参考[创建同步任务](/ticdc/ticdc-manage-changefeed.md#创建同步任务)
2828

29+
## TiCDC 与 TiFlash 的兼容性
30+
31+
目前,使用 TiCDC 同步表到下游 TiDB 集群时,不支持为表创建 TiFlash 副本,即 TiCDC 不支持同步 TiFlash 相关的 DDL,例如:
32+
33+
* `ALTER TABLE table_name SET TIFLASH REPLICA count;`
34+
* `ALTER DATABASE db_name SET TIFLASH REPLICA count;`
35+
2936
## 命令行参数和配置文件兼容性
3037

3138
* TiCDC v4.0.0 中移除了 `ignore-txn-commit-ts`,添加了 `ignore-txn-start-ts`,使用 start_ts 过滤事务。

0 commit comments

Comments
 (0)