docs(im): document chat.join_requests in the lark-im skill - #2395
Conversation
|
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe Lark IM skill documentation adds ChangesChat Join Request Documentation
Estimated code review effort: 1 (Trivial) | ~5 minutes Merge Risk: ⚪ Minimal · up to This PR adds documentation for the existing chat join-request commands and does not introduce actionable merge-blocking risk; it is merge-ready after normal checks and review. Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Full details: Docstring CoverageExplanation No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.) ✨ 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@cd233d31242c1666bef0a9501f1926cee05bea8d🧩 Skill updatenpx skills add larksuite/cli#feat/im-chat-join-requests -y -g |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2395 +/- ##
=======================================
Coverage 76.06% 76.06%
=======================================
Files 1106 1106
Lines 123651 123651
=======================================
+ Hits 94056 94058 +2
+ Misses 22106 22105 -1
+ Partials 7489 7488 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Add the chat.join_requests resource (list / handle) and its two scope rows, matching the registry-side whitelist. Both methods are user identity only and require the caller to be the chat owner or an admin. The list entry records a pagination trap verified against the live API: page_token is returned even when has_more is false, so an agent that pages while page_token is present never terminates. The handle entry records that results[] mirrors items[] in count and order and that exit 0 does not mean every item succeeded. Written by hand rather than via gen-skills. skill-template/domains/im.md last changed in 7675185, while this file has five later commits that edited it directly (#2319, #2223, #2194, #2146, #1906), so a full regeneration silently reverts them. Reconciling the template with this file is left as separate work.
097fd7d to
cd233d3
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
Add the chat.join_requests resource (list / handle) and its two scope rows, matching the registry-side whitelist. Both methods are user identity only and require the caller to be the chat owner or an admin. The list entry records a pagination trap verified against the live API: page_token is returned even when has_more is false, so an agent that pages while page_token is present never terminates. The handle entry records that results[] mirrors items[] in count and order and that exit 0 does not mean every item succeeded. Written by hand rather than via gen-skills. skill-template/domains/im.md last changed in 7675185, while this file has five later commits that edited it directly (#2319, #2223, #2194, #2146, #1906), so a full regeneration silently reverts them. Reconciling the template with this file is left as separate work.
Summary
Expose the two Feishu OpenAPI group join-request endpoints in the
imdomain: listing a chat's pending join requests and approving or rejecting them in bulk. This is the CLI-side skill documentation for the change; the command surface itself is generated from the registry and needs no Go code.Changes
chat.join_requestsresource inskills/lark-im/SKILL.md(list/handle)Command surface:
lark-cli im chat.join_requests list --chat-id oc_xxx [--page-size 1-100] [--page-all] lark-cli im chat.join_requests handle --chat-id oc_xxx \ --data '{"items":[{"member_id":"ou_xxx","action":"approve"}]}'Both methods are user identity only (
user_access_token) and require the caller to be the chat owner or an admin.listisrisk: read,handleisrisk: write.Two behaviours are called out in the skill text because they are not discoverable from
lark-cli schema:page_tokenis returned even whenhas_moreisfalse, so an agent that pages whilepage_tokenis present never terminates. Stop onhas_more == false. The built-in--page-allalready keys offhas_moreand is unaffected.results[]mirrors the requestitems[]in count and order; each entry carriessuccess/failed/already_handled. Exit 0 does not mean every item succeeded.The CLI resource is named
chat.join_requestsrather than the upstreamchat.membership_application: the upstream name does not read as "pending join requests", is the longest resource name in the domain, and is singular where every other collection resource inimis plural.docUrland the OAuth scopes keep the upstream name, so the official docs stay one hop away.This file is edited by hand rather than regenerated.
skill-template/domains/im.mdlast changed in 7675185 while this file has five later commits that edited it directly (#2319, #2223, #2194, #2146, #1906), so a fullgen-skillsrun silently reverts them. Reconciling the template with this file is left as separate work.Test Plan
internal/registry,cmd/service,cmd/schema,cmd,shortcuts/imand 12 more packages greenlark-cli im chat.join_requestsflow works as expectedVerified against a live tenant with a real pending request:
listreturns the pending entry withapplicant,inviter,reason,apply_sourceandapply_time--page-allterminates on the first page despite the trailingpage_tokenhandlewithapprovereturnsresults[0].result: "success"; the approved user is then present inchat.members get, andlistreturnstotal: 0handlereturnsresults[0].result: "already_handled"lark-cli schemareportsrisk: read/risk: writeanduser-only identity for the two methodsNot covered: rejecting a real request, and the
failedbranch ofresults[]. Both need a request that can be sacrificed to the test.The pre-existing failures in
tests/cli_e2e/*are unrelated — they need live credentials this environment does not have, and the failing test set is byte-identical before and after this change.Related Issues
Summary by CodeRabbit