Skip to content

feat: add approve domain#217

Merged
MaxHuang22 merged 1 commit intolarksuite:mainfrom
zhaoshengmeng626:feat/approval_domain_add
Apr 2, 2026
Merged

feat: add approve domain#217
MaxHuang22 merged 1 commit intolarksuite:mainfrom
zhaoshengmeng626:feat/approval_domain_add

Conversation

@zhaoshengmeng626
Copy link
Copy Markdown
Contributor

@zhaoshengmeng626 zhaoshengmeng626 commented Apr 2, 2026

Summary

Add the approval domain skill and register its service description

Changes

  • Add skills/lark-approval/SKILL.md with:
    • Skill frontmatter (name, version, description, requires)
    • API resource documentation for instances (get, cancel, cc) and tasks (approve, reject, transfer, query)
    • Permission scope table mapping each method to its required scope
    • Register approval service in internal/registry/service_descriptions.json with bilingual (en/zh) title and description

Test Plan

  • Run lark-cli approval --help and verify the approval subcommand is recognized
  • Run lark-cli schema approval.instances.get and confirm the schema output is correct
  • Run lark-cli schema approval.tasks.query and confirm the schema output is correct

Summary by CodeRabbit

  • New Features

    • Introduced Approval API for managing approval instances and tasks, including instance actions (get, cancel, cc) and task actions (approve, reject, transfer, query).
  • Documentation

    • Added end-user documentation covering CLI command patterns, how to inspect API schemas, and required permission scopes for each method.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 2, 2026

📝 Walkthrough

Walkthrough

Added a new "Approval API" service entry to the service registry with English and Simplified Chinese localized metadata, plus new skill documentation describing available resources (instances, tasks), methods, CLI usage, and required permission scopes.

Changes

Cohort / File(s) Summary
Service Registry
internal/registry/service_descriptions.json
Added new top-level approval entry with en and zh localized title and description metadata.
Skill Documentation
skills/lark-approval/SKILL.md
Added new lark-approval skill (v1.0.0) documenting Approval API v4: resources (instances, tasks), supported methods, CLI patterns (lark-cli approval), and required OAuth scopes mapping per method.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 A little rabbit hops, with docs in tow,

I added approvals, in English and 中文 so,
Instances and tasks now lined in a row,
CLI tips and scopes in a neat little show,
Hop on, review quick—away I go!

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'feat: add approve domain' is vague and does not clearly convey the main change. 'Approve domain' is ambiguous and could refer to approval system, permissions, or other concepts; it does not specifically indicate that an approval skill and service registration are being added. Consider using a more descriptive title like 'feat: add approval skill and service registration' to clearly specify what domain/skill is being added.
✅ Passed checks (2 passed)
Check name Status Explanation
Description check ✅ Passed The pull request description follows the template structure with all required sections (Summary, Changes, Test Plan) completed and contains substantive details about the changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@github-actions github-actions bot added the size/M Single-domain feat or fix with limited business impact label Apr 2, 2026
@greptile-apps
Copy link
Copy Markdown

greptile-apps bot commented Apr 2, 2026

Greptile Summary

This PR adds the Lark Approval API skill by introducing skills/lark-approval/SKILL.md and registering the service in internal/registry/service_descriptions.json. The skill documents approval instance operations (get, cancel, cc) and task operations (approve, reject, transfer, query) with a complete permission scope table, following the same conventions as other skills in the repository.

Confidence Score: 5/5

Safe to merge — only a minor grammar nit remains, no logic or correctness issues.

Both files are documentation/config only, the SKILL.md structure matches existing patterns, the permission scopes are consistent, and the only finding is a P2 punctuation suggestion.

No files require special attention.

Important Files Changed

Filename Overview
internal/registry/service_descriptions.json Adds "approval" service entry with bilingual title/description; minor grammar nit (spurious Oxford comma) in the English description.
skills/lark-approval/SKILL.md New skill document for Lark approval API v4; documents instances (get/cancel/cc) and tasks (approve/reject/transfer/query) with a correctly scoped permission table. Frontmatter description is now consistent with the documented resources.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[lark-cli approval] --> B[instances]
    A --> C[tasks]
    B --> B1["get\n(approval:instance:read)"]
    B --> B2["cancel\n(approval:instance:write)"]
    B --> B3["cc\n(approval:instance:write)"]
    C --> C1["approve\n(approval:task:write)"]
    C --> C2["reject\n(approval:task:write)"]
    C --> C3["transfer\n(approval:task:write)"]
    C --> C4["query\n(approval:task:read)"]
Loading

Reviews (2): Last reviewed commit: "add approve domain" | Re-trigger Greptile

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
internal/registry/service_descriptions.json (1)

2-5: Minor grammatical nit in English description.

The comma before "and" is unnecessary when listing only two items. Compare with existing entries like calendar which correctly uses "Calendar, event, and attendee management" (three items with Oxford comma).

Suggested fix
 "approval": {
-    "en": { "title": "Approval API", "description": "Approval instance, and task management" },
+    "en": { "title": "Approval API", "description": "Approval instance and task management" },
     "zh": { "title": "审批 API", "description": "审批实例、审批任务管理" }
   },
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@internal/registry/service_descriptions.json` around lines 2 - 5, The English
description for the "approval" service currently contains an unnecessary comma
before "and"; update the "en" entry for the "approval" key (title "Approval
API", description) to remove the comma so the description reads "Approval
instance and task management" instead of "Approval instance, and task
management".
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@internal/registry/service_descriptions.json`:
- Around line 2-5: The English description for the "approval" service currently
contains an unnecessary comma before "and"; update the "en" entry for the
"approval" key (title "Approval API", description) to remove the comma so the
description reads "Approval instance and task management" instead of "Approval
instance, and task management".

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 5c55f84d-8eff-4302-9561-96693b52bf42

📥 Commits

Reviewing files that changed from the base of the PR and between 112dd5f and 6b9b83a.

📒 Files selected for processing (2)
  • internal/registry/service_descriptions.json
  • skills/lark-approval/SKILL.md

@zhaoshengmeng626 zhaoshengmeng626 force-pushed the feat/approval_domain_add branch from 6b9b83a to d92a150 Compare April 2, 2026 10:00
@zhaoshengmeng626 zhaoshengmeng626 changed the title add approve domain feat: add approve domain Apr 2, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 2, 2026

🚀 PR Preview Install Guide

🧰 CLI update

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

🧩 Skill update

npx skills add zhaoshengmeng626/lark-cli#feat/approval_domain_add -y -g

@MaxHuang22 MaxHuang22 merged commit 6692300 into larksuite:main Apr 2, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/M Single-domain feat or fix with limited business impact

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants