feat: add markdown +patch shortcut#857
Conversation
Change-Id: I8159941ff9dec4e5cbf0c757ec19ee172b302224
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (14)
📝 WalkthroughWalkthroughThis PR adds a new ChangesMarkdown Patch Feature
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
Codecov Report❌ Patch coverage is
❌ Your patch check has failed because the patch coverage (55.24%) is below the target coverage (60.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #857 +/- ##
==========================================
- Coverage 65.85% 65.81% -0.04%
==========================================
Files 517 518 +1
Lines 48761 48894 +133
==========================================
+ Hits 32113 32182 +69
- Misses 13885 13939 +54
- Partials 2763 2773 +10 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
🚀 PR Preview Install Guide🧰 CLI updatenpm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@762bf3869357de49fedeb420ca2ce262aa109116🧩 Skill updatenpx skills add larksuite/cli#feat/markdown-patch -y -g |
Summary
Add a new
markdown +patchshortcut that updates a Markdown file in Drive via a fetch-local-replace-overwrite flow, enabling targeted edits without rewriting the entire file. Supports both literal and RE2 regex matching modes.Changes
shortcuts/markdown/markdown_patch.goimplementing themarkdown +patchcommand and register it inshortcuts/markdown/shortcuts.goshortcuts/markdown/helpers.goand refactormarkdown_overwrite.goto reuse themmarkdown_patch_test.gocovering literal/regex modes, zero-match skip-upload, and flag validationtests/cli_e2e/markdown/lark-markdownskill docs, and addskills/lark-markdown/references/lark-markdown-patch.mdTest Plan
make unit-test)lark markdown +patchcommand works as expected (literal, regex, and zero-match scenarios)Related Issues
Summary by CodeRabbit
New Features
markdown +patchcommand for local text and regex-based pattern replacement on existing Drive Markdown files, with automatic match counting and selective file upload only when matches are found.Documentation