Skip to content

docs(im): document chat.join_requests in the lark-im skill - #2395

Merged
douran-dev merged 1 commit into
mainfrom
feat/im-chat-join-requests
Aug 27, 2026
Merged

douran-dev merged 1 commit into
mainfrom
feat/im-chat-join-requests

Conversation

@douran-dev

@douran-dev douran-dev commented Aug 18, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Expose the two Feishu OpenAPI group join-request endpoints in the im domain: 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

  • Document the new chat.join_requests resource in skills/lark-im/SKILL.md (list / handle)
  • Add the two matching rows to the scope table

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. list is risk: read, handle is risk: write.

Two behaviours are called out in the skill text because they are not discoverable from lark-cli schema:

  • Pagination. page_token is returned even when has_more is false, so an agent that pages while page_token is present never terminates. Stop on has_more == false. The built-in --page-all already keys off has_more and is unaffected.
  • Partial failure. results[] mirrors the request items[] in count and order; each entry carries success / failed / already_handled. Exit 0 does not mean every item succeeded.

The CLI resource is named chat.join_requests rather than the upstream chat.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 in im is plural. docUrl and 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.md last changed in 7675185 while this file has five later commits that edited it directly (#2319, #2223, #2194, #2146, #1906), so a full gen-skills run silently reverts them. Reconciling the template with this file is left as separate work.

Test Plan

  • Unit tests pass — internal/registry, cmd/service, cmd/schema, cmd, shortcuts/im and 12 more packages green
  • Manual local verification confirms the lark-cli im chat.join_requests flow works as expected

Verified against a live tenant with a real pending request:

  • list returns the pending entry with applicant, inviter, reason, apply_source and apply_time
  • --page-all terminates on the first page despite the trailing page_token
  • handle with approve returns results[0].result: "success"; the approved user is then present in chat.members get, and list returns total: 0
  • replaying the same handle returns results[0].result: "already_handled"
  • lark-cli schema reports risk: read / risk: write and user-only identity for the two methods

Not covered: rejecting a real request, and the failed branch of results[]. 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

  • None

Summary by CodeRabbit

  • Documentation
    • Added guidance for viewing pending chat join requests.
    • Documented bulk approval and rejection workflows, including permissions, pagination, batch handling, and individual results.
    • Updated the permissions reference with the required read and write scopes.
    • Clarified how pending requests and approval or rejection outcomes are represented.

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@github-actions github-actions Bot added domain/im PR touches the im domain size/M Single-domain feat or fix with limited business impact labels Aug 18, 2026
@coderabbitai

coderabbitai Bot commented Aug 18, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 2bca3a2f-1413-48df-8051-7d5e0cf91d8f

📥 Commits

Reviewing files that changed from the base of the PR and between 0d5334a and cd233d3.

📒 Files selected for processing (1)
  • skills/lark-im/SKILL.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • skills/lark-im/SKILL.md

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

The Lark IM skill documentation adds chat.join_requests guidance for listing and bulk processing pending membership applications. It documents access restrictions, pagination, per-item results, batch behavior, and related permissions.

Changes

Chat Join Request Documentation

Layer / File(s) Summary
Join request API contract and permissions
skills/lark-im/SKILL.md
Documents paginated listing and ordered bulk approval or rejection of pending join requests. Adds access restrictions, batch behavior, per-item results, and permission mappings.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Merge Risk: ⚪ Minimal · up to cd233

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: sang-neo03

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: documenting the chat.join_requests resource in the lark-im skill.
Description check ✅ Passed The description includes all required sections, explains the scope and implementation, lists the changes, documents the test plan and limitations, and identifies related issues as none.
Docstring Coverage ✅ Passed 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…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

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)
  • Create PR with unit tests
  • Commit unit tests in branch feat/im-chat-join-requests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Aug 18, 2026 •

Copy link
Copy Markdown

🚀 PR Preview Install Guide

🧰 CLI update

npm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@cd233d31242c1666bef0a9501f1926cee05bea8d

🧩 Skill update

npx skills add larksuite/cli#feat/im-chat-join-requests -y -g

@codecov

codecov Bot commented Aug 18, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.06%. Comparing base (0d5334a) to head (cd233d3).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@douran-dev
douran-dev requested a review from sang-neo03 August 27, 2026 11:16
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.
@douran-dev
douran-dev force-pushed the feat/im-chat-join-requests branch from 097fd7d to cd233d3 Compare August 27, 2026 11:21
@coderabbitai

coderabbitai Bot commented Aug 27, 2026

Copy link
Copy Markdown

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.

@douran-dev
douran-dev merged commit a68984f into main Aug 27, 2026
29 of 41 checks passed
@douran-dev
douran-dev deleted the feat/im-chat-join-requests branch August 27, 2026 13:03
YH-1600 pushed a commit that referenced this pull request Aug 31, 2026
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

domain/im PR touches the im domain size/M Single-domain feat or fix with limited business impact

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants