Skip to content

feat: add drive files patch metaapi#444

Merged
fangshuyu-768 merged 1 commit intomainfrom
feat/drive-metaapi
Apr 13, 2026
Merged

feat: add drive files patch metaapi#444
fangshuyu-768 merged 1 commit intomainfrom
feat/drive-metaapi

Conversation

@wittam-01
Copy link
Copy Markdown
Collaborator

@wittam-01 wittam-01 commented Apr 13, 2026

Change-Id: Ieb5b11f004c6007813f48d4312a7d6e476bd6d79

Summary

Add the Drive files.patch meta API so lark-cli drive files patch can update Drive resource titles through the auto-generated service command layer. Update the Drive skill docs and template so agents
know to use this command for file renaming flows.

Changes

  • Add drive.files.patch metadata so the CLI exposes lark-cli drive files patch with file_token, type, and new_title
  • Document the title update capability in skills/lark-drive/SKILL.md and skill-template/domains/drive.md, including supported resource types such as docx, sheet, bitable, file, wiki, and
    folder

Test Plan

  • Unit tests pass
  • Manual local verification confirms the lark xxx command works as expected
  • Verified locally with ./lark-cli drive files patch against docx, folder, and wiki resources, and confirmed the updated titles via follow-up metadata/node queries

Related Issues

  • None

Summary by CodeRabbit

  • Documentation
    • Added guidance for modifying file titles using the drive files patch command with the new_title field
    • Extended support notes to include title modification for DOCX, Sheet, Bitable, File, Wiki, and Folder types
    • Updated API resource docs to list the files.patch method and its permission mapping for title updates
    • Clarified Reaction / 表情场景 section header and quick-use guidance to include title-modification scenarios

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 13, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 76f3b2a7-e1ed-4e70-8356-722d1ec8d341

📥 Commits

Reviewing files that changed from the base of the PR and between 42b9477 and dd155e2.

📒 Files selected for processing (2)
  • skill-template/domains/drive.md
  • skills/lark-drive/SKILL.md
✅ Files skipped from review due to trivial changes (1)
  • skill-template/domains/drive.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • skills/lark-drive/SKILL.md

📝 Walkthrough

Walkthrough

Added documentation and skill metadata to document that file titles can be modified via the drive files patch command using a new_title field for docx, sheet, bitable, file, wiki, and folder; documented files.patch API method and its permission mapping.

Changes

Cohort / File(s) Summary
Domain docs
skill-template/domains/drive.md
Added a new “修改标题” subsection describing using drive files patch with new_title to update titles for docx, sheet, bitable, file, wiki, and folder.
Skill metadata & API docs
skills/lark-drive/SKILL.md
Added "修改标题" capability, updated description and Reaction header, registered files.patch method under lark-cli drive <resource> <method> [flags], and added permission mapping files.patchdocx:document:write_only.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Suggested labels

domain/ccm

Suggested reviewers

  • fangshuyu-768

Poem

I'm a rabbit, hopping through the trees,
I nudge the titles with a gentle breeze,
A patch, a nibble, names renew,
Files sing softly — shiny, new,
🐇✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'feat: add drive files patch metaapi' clearly and concisely summarizes the main change—adding Drive files.patch meta API support to the CLI.
Description check ✅ Passed The PR description follows the required template with complete Summary, Changes, Test Plan, and Related Issues sections, providing clear details about what was added and how it was verified.
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
  • Commit unit tests in branch feat/drive-metaapi

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 13, 2026
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.

Actionable comments posted: 2

🧹 Nitpick comments (1)
skill-template/domains/drive.md (1)

12-12: Polish parameter formatting for consistency.

Line 12 is clear functionally, but new_title is easier to scan if formatted as code and spaced consistently with the rest of this doc style.

Suggested doc tweak
-- 使用 `drive files patch` 命令,通过new_title字段可以修改标题,支持 docx、sheet、bitable、file、wiki、folder 类型
+- 使用 `drive files patch` 命令,通过 `new_title` 字段修改标题,支持 `docx`、`sheet`、`bitable`、`file`、`wiki`、`folder` 类型。
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@skill-template/domains/drive.md` at line 12, Update the sentence that
documents the drive files patch usage to format the parameter name `new_title`
as inline code and ensure spacing matches the doc's style (e.g., backticks
around `new_title` and consistent spaces after commas); locate the line
referencing the `drive files patch` command and the list of supported types
(docx, sheet, bitable, file, wiki, folder) and change `new_title` to be
presented as `new_title` so it visually matches other parameters in the
document.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@skills/lark-drive/SKILL.md`:
- Line 223: Update the `files.patch` capability description to match the
multi-type support used elsewhere: replace the current single-type text
("支持docx") with the full list used on Lines 4 and 25 (e.g.,
"支持docx/sheet/bitable/file/wiki/folder") so the `files.patch` entry is
consistent with the rest of the document.
- Line 274: The permission mapping for files.patch → base:app:update is
semantically inconsistent: locate the mapping in SKILL.md and the authoritative
registry entry in internal/registry/scope_priorities.json (search for
"files.patch" and "base:app:update") and either (A) justify and document why a
Drive file modification requires the Base-specific scope by adding an explicit
rationale in SKILL.md, or (B) change the mapping to a more appropriate Drive
scope (e.g., a drive-specific update scope used elsewhere like
"drive:files:update" or the existing Drive-related scopes in the registry) and
update both SKILL.md and the registry entry to match; ensure all other Drive
methods in the same table use domain-consistent scopes (e.g., docs:*, space:*)
and run registry validation to confirm no conflicts.

---

Nitpick comments:
In `@skill-template/domains/drive.md`:
- Line 12: Update the sentence that documents the drive files patch usage to
format the parameter name `new_title` as inline code and ensure spacing matches
the doc's style (e.g., backticks around `new_title` and consistent spaces after
commas); locate the line referencing the `drive files patch` command and the
list of supported types (docx, sheet, bitable, file, wiki, folder) and change
`new_title` to be presented as `new_title` so it visually matches other
parameters in the document.
🪄 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: 8c1bf2a3-11dd-4701-92cd-1165234d53a4

📥 Commits

Reviewing files that changed from the base of the PR and between bb79572 and 42b9477.

📒 Files selected for processing (2)
  • skill-template/domains/drive.md
  • skills/lark-drive/SKILL.md

Comment thread skills/lark-drive/SKILL.md Outdated
Comment thread skills/lark-drive/SKILL.md Outdated
@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Apr 13, 2026

Greptile Summary

This PR is a documentation-only change: it adds a ## 修改标题 section explaining drive files patch to both skills/lark-drive/SKILL.md and skill-template/domains/drive.md, adds patch to the API Resources listing, and adds a permissions-table row for files.patch. The underlying CLI command is auto-generated from remote meta data; no Go code is changed here.

Confidence Score: 5/5

Documentation-only PR; no code changes. Safe to merge once prior reviewer concerns about wiki token guidance are addressed.

All remaining findings are P2 style suggestions. The two previously flagged P1-level concerns (scope inconsistency and wiki token guidance) were raised in prior review threads and partially addressed by the author; no new blocking issues were found.

skills/lark-drive/SKILL.md line 274 (permission scope) and line 25 (wiki token guidance) warrant a final author check before merge.

Important Files Changed

Filename Overview
skills/lark-drive/SKILL.md Adds ## 修改标题 section, patch to the files API Resources list, and files.patch scope row; wiki token-resolution guidance is still absent from the new title-patching section.
skill-template/domains/drive.md Mirrors the same ## 修改标题 one-liner added to SKILL.md; missing wiki token-resolution note equally absent.

Reviews (2): Last reviewed commit: "feat: add drive files patch metaapi" | Re-trigger Greptile

Comment thread skills/lark-drive/SKILL.md Outdated
Comment thread skills/lark-drive/SKILL.md
Comment thread skills/lark-drive/SKILL.md
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 13, 2026

🚀 PR Preview Install Guide

🧰 CLI update

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

🧩 Skill update

npx skills add larksuite/cli#feat/drive-metaapi -y -g

Change-Id: Ieb5b11f004c6007813f48d4312a7d6e476bd6d79
@wittam-01 wittam-01 force-pushed the feat/drive-metaapi branch from 42b9477 to dd155e2 Compare April 13, 2026 09:48
@fangshuyu-768 fangshuyu-768 merged commit 88bf7fc into main Apr 13, 2026
12 checks passed
@fangshuyu-768 fangshuyu-768 deleted the feat/drive-metaapi branch April 13, 2026 10:51
yxzhaao pushed a commit to yxzhaao/cli that referenced this pull request Apr 14, 2026
Change-Id: Ieb5b11f004c6007813f48d4312a7d6e476bd6d79
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