Skip to content

Document mail sender allow/block commands#1885

Open
infeng wants to merge 2 commits into
larksuite:mainfrom
infeng:feat/019f2f4
Open

Document mail sender allow/block commands#1885
infeng wants to merge 2 commits into
larksuite:mainfrom
infeng:feat/019f2f4

Conversation

@infeng

@infeng infeng commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

Adds documentation and tests for the mail sender allow/block command surface in the generated CLI metadata. The change updates the mail skill reference and covers schema and help visibility so users can discover the list, search, batch_set, and batch_delete commands.

Summary by CodeRabbit

  • Documentation
    • Added native API usage guidance for user-level email sender allowlists and blocklists, including list (keyword search), batch_create, and batch_remove with request examples.
  • Tests
    • Expanded schema command tests to validate allowlist/blocklist JSON output, including required fields and scopes.
    • Added dry-run integration-style checks to confirm generated API request method, URL, and expected parameters/body for allow/blocked sender scenarios.

@github-actions github-actions Bot added domain/mail PR touches the mail domain size/L Large or sensitive change across domains or core paths labels Jul 14, 2026
@coderabbitai

coderabbitai Bot commented Jul 14, 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

Run ID: d57884f8-9051-4050-91ad-bd62ad675868

📥 Commits

Reviewing files that changed from the base of the PR and between 3ea1723 and c27d4ca.

📒 Files selected for processing (2)
  • cmd/schema/schema_test.go
  • cmd/service/service_test.go
🚧 Files skipped from review as they are similar to previous changes (2)
  • cmd/service/service_test.go
  • cmd/schema/schema_test.go

📝 Walkthrough

Walkthrough

The changes add schema and dry-run integration tests for user-level mail sender allowlists and blocklists, plus documentation covering list, batch creation, and batch removal commands.

Changes

Mail sender allow/block lists

Layer / File(s) Summary
Schema contract validation
cmd/schema/schema_test.go
Generates remote metadata for schema tests and validates the mail.user_mailbox.allow_senders.list schema, parameters, and required scopes.
Dry-run request coverage
cmd/service/service_test.go
Adds six dry-run scenarios covering allowlist and blocklist listing, batch creation, and batch removal requests, including methods, URLs, parameters, and bodies.
Command usage documentation
skills/lark-mail/SKILL.md
Documents sender allow/block list commands, parameters, request bodies, and usage examples.

Estimated code review effort: 3 (Moderate) | ~20 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is missing the required Summary, Changes, Test Plan, and Related Issues sections from the template. Rewrite it using the template headings and add a concise summary, bullet list of changes, test plan, and related issues.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the main change: adding documentation and tests for mail sender allow/block commands.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
⚔️ Resolve merge conflicts
  • Resolve merge conflict in branch feat/019f2f4

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 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 `@cmd/schema/schema_test.go`:
- Around line 51-52: Isolate configuration state for tests using
cmdutil.TestFactory by setting LARKSUITE_CLI_CONFIG_DIR to t.TempDir() at the
beginning of TestSchemaCmd_MailSenderAllowBlockList in cmd/schema/schema_test.go
(lines 51-52) and the corresponding test in cmd/service/service_test.go (lines
126-127).
- Around line 63-65: Update the expected schema ID assertion in the schema test
to use the plural value user_mailbox.allow_senders.list, including the failure
message, so it matches the command path and mail schema naming.
🪄 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: 02b410fe-6c1d-4ccd-92ad-63f7611ece54

📥 Commits

Reviewing files that changed from the base of the PR and between 37d490a and 3ea1723.

📒 Files selected for processing (3)
  • cmd/schema/schema_test.go
  • cmd/service/service_test.go
  • skills/lark-mail/SKILL.md

Comment thread cmd/schema/schema_test.go
Comment thread cmd/schema/schema_test.go Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

domain/mail PR touches the mail domain size/L Large or sensitive change across domains or core paths

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant