feat: return real tenant URLs for drive +upload and markdown +create#992
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 (9)
📝 WalkthroughWalkthroughThis PR introduces a unified abstraction for fetching Drive file metadata (title and access URL) and integrates it into the Drive upload and Markdown create shortcuts to replace constructed URL logic with real metadata-based access URLs. OAuth scopes are expanded to include metadata read access, and test coverage is updated across unit and e2e layers to validate the new behavior. ChangesDrive metadata URL unification
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)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #992 +/- ##
==========================================
+ Coverage 67.66% 67.68% +0.01%
==========================================
Files 576 576
Lines 54510 54548 +38
==========================================
+ Hits 36885 36919 +34
- Misses 14566 14568 +2
- Partials 3059 3061 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
🚀 PR Preview Install Guide🧰 CLI updatenpm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@a6e706044ed00789a0951bd1567ff800936ff231🧩 Skill updatenpx skills add larksuite/cli#feat/real-upload-url -y -g |
Change-Id: I6b513eef57a3479c8971b3bb6cbf005cad3f8040
ac97991 to
a6e7060
Compare
…arksuite#992) Change-Id: I6b513eef57a3479c8971b3bb6cbf005cad3f8040
• ## Summary
Return real tenant-specific URLs for
drive +uploadandmarkdown +create. This avoids hardcoded fallback domains and also returns URLs for Wiki-targeted Markdown creation.Changes
drive +uploadto return the real tenant URL after upload.markdown +createto return the real tenant URL for both Drive folder and Wiki parent targets.markdown +overwriteunchanged per scope.Test Plan
go test ./shortcuts/common ./shortcuts/drive ./shortcuts/markdownmake unit-testgo vet ./...,gofmt -l .,go mod tidy,golangci-lint --new-from-rev=origin/maindrive +uploadandmarkdown +createreturn real tenant URLs for Drive and Wiki targetsRelated Issues
Summary by CodeRabbit
New Features
Bug Fixes
Authorization Changes
drive:drive.metadata:readonlyscope to retrieve metadata during upload operations.