Skip to content

fix: 知识库术语统一为 book(repo → book,v1.1.0) - #1

Merged
chen201724 merged 3 commits into
mainfrom
fix/book-terminology
Jul 23, 2026
Merged

fix: 知识库术语统一为 book(repo → book,v1.1.0)#1
chen201724 merged 3 commits into
mainfrom
fix/book-terminology

Conversation

@chen201724

@chen201724 chen201724 commented Jul 23, 2026

Copy link
Copy Markdown
Member

变更

知识库在 CLI 面上统一称 book,与语雀官方术语(知识库 = Book)、OpenAPI 的 V2Book/book_id 以及 yuque-mcp-server 的 yuque_*_book 工具命名对齐:

  • repo list/get/create/update/deletebook list/get/create/update/delete;各命令的 <repo> 位置参数改为 <book>
  • search --type 取值改为 doc|bookrepo 保留为兼容别名,线上请求值不变仍为 repo
  • 帮助文案、双语 README、契约测试(spec-coverage / docs 锁)、mock 与真实 API e2e 全部同步
  • 不变:HTTP 路径 /repos/...(线上契约)、YUQUE_E2E_REPO 等环境变量(配置契约)、vendored spec
  • 版本 1.1.0(与 1.0.0 同日发布的命名修复,遵从语义化版本不滥用 major)

验证

本地 npm run check 全绿(170 单测 + 31 mock e2e + dist 冒烟)。本 PR 同时用于演练 CI 的真实 API e2e 流程——Node 22 腿将以专用测试账号真实调用语雀 API 验证改名后的读路径。

🤖 Generated with Claude Code

Aligns the CLI surface with Yuque terminology (知识库 = book, matching the
API's V2Book/book_id and yuque-mcp-server's yuque_*_book tools):

- repo list/get/create/update/delete -> book ...; <repo> args -> <book>
- search --type takes doc|book (repo kept as a compatibility alias; wire
  value unchanged)
- HTTP paths (/repos/...), YUQUE_E2E_REPO env vars, and the vendored spec
  stay as-is — they are wire/config contracts, not surface terminology
- version 2.0.0 (breaking command rename)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b9ad5be659

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/commands/doc.ts
create
.description('Create a doc in a repo')
.argument('<repo>', REPO_ARG_HELP)
.argument('<book>', BOOK_ARG_HELP)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Replace stale repo terminology in document help

Changing this argument to <book> leaves the same command described as “Create a doc in a repo,” while doc get --help and its validation errors still instruct users to pass <repo> <doc>. Consequently, the 2.0 CLI help contradicts the renamed command surface and the updated READMEs; update the remaining user-facing strings in this command module to use book consistently.

Useful? React with 👍 / 👎.

chen201724 and others added 2 commits July 23, 2026 19:54
…nd comments

Addresses the Codex review note on PR #1: doc get/create help and usage errors,
search --scope help, internal params/labels — all now say book. The wire enum
comment in search.ts is intentional and stays.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@chen201724 chen201724 changed the title fix!: 知识库术语统一为 book(repo → book,v2.0.0) fix: 知识库术语统一为 book(repo → book,v1.1.0) Jul 23, 2026
@chen201724
chen201724 merged commit 07e57f6 into main Jul 23, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant