feat: support docs fetch user cite language#1459
Conversation
|
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 (4)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthrough
Changes--lang support for lark-doc fetch
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1459 +/- ##
=======================================
Coverage 73.38% 73.38%
=======================================
Files 750 750
Lines 69355 69364 +9
=======================================
+ Hits 50897 50906 +9
Misses 14709 14709
Partials 3749 3749 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
🚀 PR Preview Install Guide🧰 CLI updatenpm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@bb005a875bdad08af312b5de296a798b5f499efa🧩 Skill updatenpx skills add ZEden0/cli#feat/cli-docs-cite-user-lang-v3 -y -g |
51d0f9d to
8de4da2
Compare
8de4da2 to
bb005a8
Compare
Summary
This PR adds
--langsupport todocs +fetch --api-version v2so callers can request a preferred display language for user cite names in fetched Docx content.When
--langis omitted, the command falls back to the current profile language and omitslangentirely when no language preference is configured.Changes
--langflag to the docs v2 fetch shortcut and include it in the OpenAPI fetch request body.--langoption in thelark-docfetch reference.Test Plan
go test ./shortcuts/doc ./internal/core -run 'TestBuildFetchBody|TestDocsFetch|TestResolveConfigFromMulti_CarriesLang|TestResolveConfigFromMulti_AcceptsPlainSecret' -count=1go test ./shortcuts/doc ./internal/core ./internal/credential ./cmd/config ./cmd/profile -count=1git diff --check upstream/main...HEADdocs +fetch --api-version v2 --lang en-USreturns an English user cite display name.docs +fetch --api-version v2keeps the default user cite display name.docs +fetch --api-version v2 --lang xx-YYsucceeds and falls back to the default display name.Related Issues
N/A
Summary by CodeRabbit
--langflag to v2 (OpenAPI) documentation fetch operations to control the language used during retrieval.--langis set, that value is used; if not set, the operation falls back to the existing runtime configuration language; if explicitly set to an empty value, the language is omitted.Langvalue correctly.