feat(drive): add +member-remove shortcut#1994
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:
📝 WalkthroughWalkthroughAdds the ChangesDrive member removal
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant CLI
participant DriveMemberRemove
participant DrivePermissionsAPI
participant Output
CLI->>DriveMemberRemove: submit validated removal command
DriveMemberRemove->>DrivePermissionsAPI: DELETE collaborator permission
DrivePermissionsAPI-->>DriveMemberRemove: response or typed API error
DriveMemberRemove->>Output: emit structured removal result
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ 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 |
🚀 PR Preview Install Guide🧰 CLI updatenpm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@162e896efc932b3bbd59c89106040b84d71488c2🧩 Skill updatenpx skills add larksuite/cli#feat/drive-member-remove-shortcut -y -g |
4936c2c to
6a48bda
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1994 +/- ##
==========================================
+ Coverage 75.07% 75.08% +0.01%
==========================================
Files 901 903 +2
Lines 95560 95965 +405
==========================================
+ Hits 71739 72060 +321
- Misses 18319 18369 +50
- Partials 5502 5536 +34 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Add drive +member-remove for removing one collaborator permission from Drive documents, files, folders, and wiki nodes. The shortcut validates resource and member contracts before issuing the high-risk DELETE request, preserves structured CLI errors, and documents identity and wiki permission behavior. Key features: - Resolve resource type from supported URLs or require it for bare tokens - Support user and bot identities with member-type-specific validation - Require explicit confirmation and return stable removal metadata - Reject unsupported slash-containing tokens and member IDs before API calls - Add unit, dry-run E2E, live workflow, and skill documentation coverage
b8fc727 to
162e896
Compare
Add a high-risk Drive shortcut for removing one collaborator permission through the permission member delete API. The command validates resource and member combinations, previews the exact DELETE request, and returns an auditable success receipt.
Key features:
Reuse existing Drive member target, member type, and wiki permission helpers without changing +member-add
Require explicit confirmation and reject unsupported bot department removal before the API call
Cover request shaping, typed errors, dry-run behavior, and the live add/remove workflow
Related Issues
Summary by CodeRabbit
drive +member-removeto remove exactly one collaborator’s Drive permission, with wiki-specific handling and structured progress/output.--dry-run, parameter rules, and returned field meanings).