Skip to content

fix: prefix docs resource shortcuts - #1564

Merged
SunPeiYang996 merged 1 commit into
larksuite:mainfrom
ZEden0:fix/docs-resource-shortcut-prefix
Jun 24, 2026
Merged

fix: prefix docs resource shortcuts#1564
SunPeiYang996 merged 1 commit into
larksuite:mainfrom
ZEden0:fix/docs-resource-shortcut-prefix

Conversation

@ZEden0

@ZEden0 ZEden0 commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

Summary

Fix the docs resource cover shortcuts so they follow the same +<verb> shortcut naming convention as other lark-cli docs subcommands. This aligns the executable command names, help output, and embedded lark-doc skill guidance for cover download/update/delete flows.

Changes

  • Rename docs cover resource shortcuts from resource-download, resource-update, and resource-delete to +resource-download, +resource-update, and +resource-delete
  • Update docs cover resource tests to execute and assert the +resource-* command names
  • Update lark-doc skill guidance, fetch reference, and resource cover reference examples to use docs +resource-*

Test Plan

  • /usr/local/go/bin/go test ./shortcuts/doc
  • /usr/local/go/bin/go test ./shortcuts
  • /usr/local/go/bin/go test ./internal/skillcontent ./internal/qualitygate/skillscan ./internal/qualitygate/rules
  • git diff --check
  • Live E2E with current ./lark-cli and updated lark-doc skill:
    • Created a temporary Docx document
    • Verified docs +resource-download fails with typed failed_precondition when cover is empty
    • Verified docs +resource-delete is idempotent when cover is empty
    • Verified docs +resource-update uploads cover images and preserves offset fields
    • Verified docs +resource-download --overwrite downloads the updated cover and matches source image SHA-256
    • Verified deleting the cover makes subsequent download fail with typed failed_precondition

Related Issues

N/A

Summary by CodeRabbit

  • Documentation
    • Updated CLI help and reference docs to use the new +resource-* shortcut names for document cover actions.
    • Clarified example commands for downloading, updating, and deleting cover images.
    • Refreshed command output and error behavior descriptions, including cases where a document has no cover and when delete is already complete.

@coderabbitai

coderabbitai Bot commented Jun 24, 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: 4e57aa3f-9937-4f73-8567-5ea54425a5d1

📥 Commits

Reviewing files that changed from the base of the PR and between b3514e5 and 6648816.

📒 Files selected for processing (5)
  • shortcuts/doc/doc_resource_cover.go
  • shortcuts/doc/doc_resource_cover_test.go
  • skills/lark-doc/SKILL.md
  • skills/lark-doc/references/lark-doc-fetch.md
  • skills/lark-doc/references/lark-doc-resource-cover.md

📝 Walkthrough

Walkthrough

Three exported CLI shortcut Command strings in doc_resource_cover.go are renamed by adding a + prefix (resource-download/update/delete+resource-download/+resource-update/+resource-delete). All test call sites and the Shortcuts() assertion are updated to match, and four documentation files are updated to reflect the new command names.

Changes

Cover resource command prefix rename

Layer / File(s) Summary
Shortcut Command field rename
shortcuts/doc/doc_resource_cover.go
Command field for DocResourceDownload, DocResourceUpdate, and DocResourceDelete changed from resource-* to +resource-*.
Test invocations and assertions
shortcuts/doc/doc_resource_cover_test.go
All mountAndRunDocs call sites and the Shortcuts() assertion list updated to use the +-prefixed command strings.
Documentation
skills/lark-doc/SKILL.md, skills/lark-doc/references/lark-doc-fetch.md, skills/lark-doc/references/lark-doc-resource-cover.md
CLI examples, decision tables, output contract descriptions, and URL security scope headers updated to use the +resource-* command forms.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • larksuite/cli#1468: Directly modifies the same DocResourceDownload, DocResourceUpdate, and DocResourceDelete shortcuts in shortcuts/doc/doc_resource_cover.go, making it the predecessor change for the resource-*+resource-* rename in this PR.

Suggested labels

size/M, domain/ccm

Suggested reviewers

  • fangshuyu-768
  • SunPeiYang996
  • caojie0621

Poem

🐇 A little + sign hops into place,
Before resource-download it leads the race.
Update and delete now wear the same hat,
Tests and docs updated, imagine that!
With one small prefix, all commands align —
This bunny thinks that's perfectly fine. ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change by describing the docs resource shortcut prefix update.
Description check ✅ Passed The description follows the template with Summary, Changes, Test Plan, and Related Issues and provides relevant details.
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.

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

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

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 added domain/ccm PR touches the ccm domain size/M Single-domain feat or fix with limited business impact labels Jun 24, 2026
@ZEden0
ZEden0 requested a review from SunPeiYang996 June 24, 2026 13:52
@github-actions

Copy link
Copy Markdown

🚀 PR Preview Install Guide

🧰 CLI update

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

🧩 Skill update

npx skills add ZEden0/cli#fix/docs-resource-shortcut-prefix -y -g

@SunPeiYang996
SunPeiYang996 merged commit 898e6d4 into larksuite:main Jun 24, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

domain/ccm PR touches the ccm 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.

2 participants