feat(wiki): support appid member type#1235
Conversation
CCM-Harness: code
📝 WalkthroughWalkthroughThis PR extends the wiki space-member shortcuts to accept ChangesWiki App Member Support
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 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 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✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1235 +/- ##
=======================================
Coverage 69.22% 69.22%
=======================================
Files 635 635
Lines 59689 59689
=======================================
Hits 41322 41322
Misses 15033 15033
Partials 3334 3334 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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/wiki/wiki_member_helpers.go`:
- Around line 15-17: Update the wikiMemberTypes allowlist to match the
documented enum for Lark/Feishu Wiki V2 by removing the unsupported "appid"
entry from the slice named wikiMemberTypes; ensure the remaining values are
exactly "openchat", "userid", "email", "opendepartmentid", "openid", "unionid"
(reorder if necessary) and run any unit/integration tests that exercise member
creation/deletion to confirm no other code expects "appid"; if an app-related
member type is actually required, replace "appid" with the correct documented
enum name and adjust code paths that handle member_type accordingly.
🪄 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: 27e697a4-6243-4177-b2a7-035212baf4cb
📒 Files selected for processing (7)
shortcuts/wiki/wiki_member_helpers.goshortcuts/wiki/wiki_member_test.goskill-template/domains/wiki.mdskills/lark-wiki/SKILL.mdskills/lark-wiki/references/lark-wiki-member-add.mdskills/lark-wiki/references/lark-wiki-member-remove.mdtests/cli_e2e/wiki/wiki_member_add_dryrun_test.go
| var wikiMemberTypes = []string{ | ||
| "openid", "userid", "email", "unionid", "openchat", "opendepartmentid", | ||
| "openid", "userid", "email", "unionid", "openchat", "opendepartmentid", "appid", | ||
| } |
There was a problem hiding this comment.
🧩 Analysis chain
🌐 Web query:
Lark Feishu wiki v2 space member create API member_type enum accepted values app
💡 Result:
In the Lark/Feishu Wiki V2 "Create Wiki space member" API, the accepted enum values for the member_type field are as follows [1][2]: - openchat: Group ID (refer to group ID documentation) [1][2] - userid: User ID [1][2] - email: User email address [1][2] - opendepartmentid: Department ID [1][2] - openid: User's Open ID [1][2] - unionid: User's Union ID [1][2] These values specify the type of identifier used in the member_id field to designate the collaborator being added to the wiki space [1][2].
Citations:
- 1: https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/wiki-v2/space-member/create
- 2: https://open.feishu.cn/document/server-docs/docs/wiki-v2/space-member/delete
Fix member_type allowlist: remove/adjust unsupported appid
Lark/Feishu Wiki V2 space-member create/delete member_type is documented to accept only: openchat, userid, email, opendepartmentid, openid, unionid—appid is not listed (so the CLI will now allow a value the server likely rejects). Update wikiMemberTypes in shortcuts/wiki/wiki_member_helpers.go (lines 15-17) to match the documented enum, or confirm the correct enum value/name for app-related members.
🤖 Prompt for 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.
In `@shortcuts/wiki/wiki_member_helpers.go` around lines 15 - 17, Update the
wikiMemberTypes allowlist to match the documented enum for Lark/Feishu Wiki V2
by removing the unsupported "appid" entry from the slice named wikiMemberTypes;
ensure the remaining values are exactly "openchat", "userid", "email",
"opendepartmentid", "openid", "unionid" (reorder if necessary) and run any
unit/integration tests that exercise member creation/deletion to confirm no
other code expects "appid"; if an app-related member type is actually required,
replace "appid" with the correct documented enum name and adjust code paths that
handle member_type accordingly.
🚀 PR Preview Install Guide🧰 CLI updatenpm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@3fb4d95cf6eddcddc576e3b05208b10a35fb2570🧩 Skill updatenpx skills add larksuite/cli#feat/wiki_member -y -g |
Summary
reference docs so agents can correctly choose
--member-type=appidfor app membership flows.Summary by CodeRabbit
New Features
--member-type=appidin addition to users, groups, and departments.Documentation
Tests