Skip to content

feat(import): add --transfer-owner flag#73

Closed
chifan42 wants to merge 1 commit intoriba2534:mainfrom
chifan42:feat/import-transfer-owner
Closed

feat(import): add --transfer-owner flag#73
chifan42 wants to merge 1 commit intoriba2534:mainfrom
chifan42:feat/import-transfer-owner

Conversation

@chifan42
Copy link
Copy Markdown

Summary

  • Add --transfer-owner flag to doc import command
  • After import, automatically grants full_access permission to the specified user
  • Optionally transfers document ownership (via --transfer-owner flag or transfer_ownership config)
  • Supports specifying email directly (--transfer-owner user@example.com) or falling back to owner_email in config

Usage

# Transfer to specific email
feishu-cli doc import doc.md --title "Doc" --transfer-owner user@example.com

# Use config owner_email as fallback
feishu-cli doc import doc.md --title "Doc" --transfer-owner

# Auto-transfer via config (transfer_ownership: true)
feishu-cli doc import doc.md --title "Doc"

Test plan

  • doc import doc.md --transfer-owner user@example.com — verify permission added + ownership transferred
  • doc import doc.md --transfer-owner with owner_email in config — verify fallback works
  • doc import doc.md with transfer_ownership: true in config — verify auto-transfer
  • doc import doc.md without flag or config — verify no permission/transfer changes (backward compatible)

…nsfer

After importing a Markdown file, automatically grant full_access permission
and optionally transfer document ownership.

- --transfer-owner <email>: transfer to specified email
- --transfer-owner (no value): use owner_email from config
- config transfer_ownership: true also triggers transfer
- Priority: CLI flag email > config owner_email
@riba2534
Copy link
Copy Markdown
Owner

riba2534 commented Apr 2, 2026

感谢提交!\n\n关闭原因: flag 设计拆分方案合理:\n1. (bool) 控制是否启用转移\n2. (string) 指定邮箱\n\n这个拆分更适合 CLI 的语义,建议重新设计后提交。

@riba2534 riba2534 closed this Apr 2, 2026
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.

2 participants