Skip to content

Commit a5111e6

Browse files
committed
feat(ci): add version detection with FunctionDescription, skip default-true settings
1 parent 663ea95 commit a5111e6

4 files changed

Lines changed: 29 additions & 3 deletions

File tree

.github/scripts/auto-fix-review.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ OUTPUT=$(evot -p "You are addressing review feedback on a documentation PR.
4343
4444
PR #${PR_NUMBER}: ${PR_TITLE}
4545
46-
The Databend source code is available at _databend/src/ for reference.
46+
The Databend source code is available at _databend/src/ for reference. Check _databend/RELEASES.txt for recent release tags to determine version numbers.
4747
4848
## Inline review comments:
4949
${FORMATTED}
@@ -60,7 +60,12 @@ Task:
6060
Rules:
6161
- Only modify files under docs/en/ and docs/cn/.
6262
- Do NOT run git, gh, or any shell commands that modify the repository state.
63-
- The CI script handles git commit, push, and PR replies." \
63+
- The CI script handles git commit, push, and PR replies.
64+
- Analyze the Databend source code in _databend/src/ and release tags to determine which version introduced or updated the feature being documented. Then add or update the FunctionDescription component at the top of the doc (after the frontmatter):
65+
For docs/en/: import FunctionDescription from '@site/src/components/FunctionDescription'; then <FunctionDescription description=\"Introduced or updated: vX.Y.Z\"/>
66+
For docs/cn/: import FunctionDescription from '@site/src/components/FunctionDescription'; then <FunctionDescription description=\"引入或更新于:vX.Y.Z\"/>
67+
If the doc already has a FunctionDescription, update the version if the change is newer.
68+
- Keep documentation concise and clear. If a setting defaults to true (enabled), do not document it separately — only mention settings that users need to explicitly change." \
6469
--output-format stream-json \
6570
--max-turns 300 --max-duration 600 2>&1 || true)
6671

.github/scripts/auto-fix.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ GEN_RAW=$(evot -p "You are fixing a documentation issue in the databend-docs rep
7171
7272
Task:
7373
1. Read the issue carefully and understand what documentation is missing or wrong.
74-
2. Look at _databend/src/ for the actual Databend source code to verify implementation details.
74+
2. Look at _databend/src/ for the actual Databend source code to verify implementation details. Check _databend/RELEASES.txt for recent release tags to determine version numbers.
7575
3. Read existing docs under docs/en/ to match the style and find the right location.
7676
4. Make the fix in docs/en/.
7777
5. If you modified any file under docs/en/, also update the corresponding file under docs/cn/ (Chinese translation). Keep technical terms in English, translate descriptions to Chinese.
@@ -80,6 +80,11 @@ Rules:
8080
- Only modify files under docs/en/ and docs/cn/.
8181
- Do NOT run git, gh, or any shell commands that modify the repository state.
8282
- The CI script handles git commit, push, and PR creation.
83+
- Analyze the Databend source code in _databend/src/ and release tags to determine which version introduced or updated the feature being documented. Then add or update the FunctionDescription component at the top of the doc (after the frontmatter):
84+
For docs/en/: import FunctionDescription from '@site/src/components/FunctionDescription'; then <FunctionDescription description=\"Introduced or updated: vX.Y.Z\"/>
85+
For docs/cn/: import FunctionDescription from '@site/src/components/FunctionDescription'; then <FunctionDescription description=\"引入或更新于:vX.Y.Z\"/>
86+
If the doc already has a FunctionDescription, update the version if the change is newer.
87+
- Keep documentation concise and clear. If a setting defaults to true (enabled), do not document it separately — only mention settings that users need to explicitly change.
8388
8489
Issue #${NUM}: ${TITLE}
8590
${BODY}" \

.github/workflows/auto-fix-issues.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,14 @@ jobs:
5454
sparse-checkout: src
5555
fetch-depth: 1
5656

57+
- name: Fetch databend release tags
58+
env:
59+
GH_TOKEN: ${{ secrets.GH_PAT }}
60+
run: |
61+
gh release list --repo databendlabs/databend --limit 50 \
62+
--json tagName,publishedAt --jq '.[] | "\(.tagName) \(.publishedAt)"' \
63+
> _databend/RELEASES.txt
64+
5765
- name: Install evot
5866
env:
5967
GH_TOKEN: ${{ secrets.GH_PAT }}

.github/workflows/auto-fix-review.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,14 @@ jobs:
7373
sparse-checkout: src
7474
fetch-depth: 1
7575

76+
- name: Fetch databend release tags
77+
env:
78+
GH_TOKEN: ${{ secrets.GH_PAT }}
79+
run: |
80+
gh release list --repo databendlabs/databend --limit 50 \
81+
--json tagName,publishedAt --jq '.[] | "\(.tagName) \(.publishedAt)"' \
82+
> _databend/RELEASES.txt
83+
7684
- name: Install evot
7785
env:
7886
GH_TOKEN: ${{ secrets.GH_PAT }}

0 commit comments

Comments
 (0)