fix: standardize CLI shortcut text in English - #1942
Conversation
|
Note Reviews pausedIt 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 Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (6)
🚧 Files skipped from review as they are similar to previous changes (3)
📝 WalkthroughWalkthroughThis PR removes localized permission hints from ChangesPermission and text updates
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
🚀 PR Preview Install Guide🧰 CLI updatenpm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@49e20a8153380f242006d3d18aff177319a03b25🧩 Skill updatenpx skills add larksuite/cli#chore/lang -y -g |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with 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.
Inline comments:
In `@shortcuts/doc/docs_create_test.go`:
- Around line 176-178: Strengthen the text assertions in
shortcuts/doc/docs_create_test.go:176-178 by comparing grant["message"] against
the complete standardized failure message rather than checking only for
“full_access”. Also update shortcuts/drive/drive_create_folder_test.go:89-95 to
assert the decoded dry-run Desc value exactly, preserving the existing test flow
and expected output contract.
In `@shortcuts/drive/drive_import_test.go`:
- Line 111: Update shortcuts/drive/drive_import_test.go:111 to assert the exact
expected bot-mode Desc value, and update
shortcuts/drive/drive_io_test.go:1103-1104 to assert the exact expected
PostUploadNote value in their respective decoded dry-run responses. Keep the
existing decoding and test flow unchanged.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: c7d8771b-57e7-4e88-a90f-bcbe894d9ec5
📒 Files selected for processing (24)
shortcuts/common/permission_grant.goshortcuts/common/permission_grant_test.goshortcuts/doc/docs_create_test.goshortcuts/doc/docs_create_v2.goshortcuts/doc/docs_fetch_im_markdown.goshortcuts/doc/docs_fetch_im_markdown_test.goshortcuts/doc/docs_fetch_v2.goshortcuts/doc/docs_fetch_v2_test.goshortcuts/doc/docs_update_v2.goshortcuts/doc/html5_block_resources_test.goshortcuts/drive/drive_add_comment.goshortcuts/drive/drive_create_folder.goshortcuts/drive/drive_create_folder_test.goshortcuts/drive/drive_import.goshortcuts/drive/drive_import_test.goshortcuts/drive/drive_io_test.goshortcuts/drive/drive_permission_grant_test.goshortcuts/drive/drive_upload.goshortcuts/drive/shortcuts_test.goshortcuts/sheets/backward/lark_sheets_sheet_create_test.goshortcuts/sheets/backward/lark_sheets_spreadsheet_management.goshortcuts/slides/slides_create.goshortcuts/wiki/wiki_node_create.goshortcuts/wiki/wiki_node_create_test.go
- translate Docs create and update help descriptions - remove localized permission annotations - replace Chinese examples and fallback text - use English labels for Docs IM Markdown resources - update regression tests for English output
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with 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.
Inline comments:
In `@shortcuts/drive/drive_create_folder_test.go`:
- Line 93: Update the test’s final API assertions to directly verify the decoded
Desc field with an exact expected dry-run text string. Use the existing decoded
response variable and assertion style, ensuring the newly added Desc contract is
validated alongside the other fields.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: d188a996-66ba-4d02-ab1d-472aa71bac57
📒 Files selected for processing (26)
shortcuts/base/base_execute_test.goshortcuts/base/base_ops.goshortcuts/common/permission_grant.goshortcuts/common/permission_grant_test.goshortcuts/doc/docs_create_test.goshortcuts/doc/docs_create_v2.goshortcuts/doc/docs_fetch_im_markdown.goshortcuts/doc/docs_fetch_im_markdown_test.goshortcuts/doc/docs_fetch_v2.goshortcuts/doc/docs_fetch_v2_test.goshortcuts/doc/docs_update_v2.goshortcuts/doc/html5_block_resources_test.goshortcuts/drive/drive_add_comment.goshortcuts/drive/drive_create_folder.goshortcuts/drive/drive_create_folder_test.goshortcuts/drive/drive_import.goshortcuts/drive/drive_import_test.goshortcuts/drive/drive_io_test.goshortcuts/drive/drive_permission_grant_test.goshortcuts/drive/drive_upload.goshortcuts/drive/shortcuts_test.goshortcuts/sheets/backward/lark_sheets_sheet_create_test.goshortcuts/sheets/backward/lark_sheets_spreadsheet_management.goshortcuts/slides/slides_create.goshortcuts/wiki/wiki_node_create.goshortcuts/wiki/wiki_node_create_test.go
🚧 Files skipped from review as they are similar to previous changes (23)
- shortcuts/sheets/backward/lark_sheets_spreadsheet_management.go
- shortcuts/common/permission_grant_test.go
- shortcuts/drive/drive_add_comment.go
- shortcuts/doc/docs_fetch_v2.go
- shortcuts/wiki/wiki_node_create.go
- shortcuts/doc/docs_update_v2.go
- shortcuts/doc/docs_fetch_im_markdown_test.go
- shortcuts/drive/drive_permission_grant_test.go
- shortcuts/base/base_ops.go
- shortcuts/doc/html5_block_resources_test.go
- shortcuts/doc/docs_create_v2.go
- shortcuts/wiki/wiki_node_create_test.go
- shortcuts/drive/drive_io_test.go
- shortcuts/doc/docs_create_test.go
- shortcuts/drive/drive_create_folder.go
- shortcuts/slides/slides_create.go
- shortcuts/drive/drive_upload.go
- shortcuts/doc/docs_fetch_im_markdown.go
- shortcuts/common/permission_grant.go
- shortcuts/sheets/backward/lark_sheets_sheet_create_test.go
- shortcuts/drive/drive_import.go
- shortcuts/doc/docs_fetch_v2_test.go
- shortcuts/base/base_execute_test.go
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1942 +/- ##
==========================================
+ Coverage 74.96% 75.03% +0.06%
==========================================
Files 892 894 +2
Lines 94077 94294 +217
==========================================
+ Hits 70529 70752 +223
+ Misses 18137 18134 -3
+ Partials 5411 5408 -3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Summary
Standardize user-facing shortcut help text, examples, permission messages, and generated resource labels in English across Docs, Drive, Sheets, Slides, and Wiki. Raw API/schema output and user-provided content are unchanged.
Changes
--reference-maphelp description and keyword example into English.任务→Task群聊卡片→Chat card多维表格→Basefull_accesspermission messages, help tips, and dry-run output.Test Plan
lark-cli <domain> <command>flow works as expected.gofmt -lreports no formatting issues in the modified Go files.git diff --checkpasses.Related Issues
Summary by CodeRabbit
full_accessonly (no extra parenthetical hint).--reference-mapflag help text and related output expectations.--file-tokenwon’t change permissions on existing files.full_access.