feat(minutes): add minutes edit shortcuts#1036
Conversation
|
|
| result, err := clie2e.RunCmd(ctx, clie2e.Request{ | ||
| Args: []string{ | ||
| "minutes", "+speaker-replace", | ||
| "--minute-token", "obcnq3b9jl72l83w4f149w9c", |
There was a problem hiding this comment.
🛑 Gitleaks has detected a secret with rule-id generic-api-key in commit 323fc7f.
If this secret is a true positive, please rotate the secret ASAP.
If this secret is a false positive, you can add the fingerprint below to your .gitleaksignore file and commit the change to this branch.
echo 323fc7f35b395ac908209e955af2804cd3334c50:tests/cli_e2e/minutes/minutes_speaker_replace_test.go:generic-api-key:25 >> .gitleaksignore
|
|
||
| err := mountAndRun(t, MinutesUpdate, []string{ | ||
| "+update", | ||
| "--minute-token", "obcnq3b9jl72l83w4f149w9c", |
There was a problem hiding this comment.
🛑 Gitleaks has detected a secret with rule-id generic-api-key in commit 323fc7f.
If this secret is a true positive, please rotate the secret ASAP.
If this secret is a false positive, you can add the fingerprint below to your .gitleaksignore file and commit the change to this branch.
echo 323fc7f35b395ac908209e955af2804cd3334c50:shortcuts/minutes/minutes_update_test.go:generic-api-key:61 >> .gitleaksignore
|
|
||
| err := mountAndRun(t, MinutesUpdate, []string{ | ||
| "+update", | ||
| "--minute-token", "obcnq3b9jl72l83w4f149w9c", |
There was a problem hiding this comment.
🛑 Gitleaks has detected a secret with rule-id generic-api-key in commit 323fc7f.
If this secret is a true positive, please rotate the secret ASAP.
If this secret is a false positive, you can add the fingerprint below to your .gitleaksignore file and commit the change to this branch.
echo 323fc7f35b395ac908209e955af2804cd3334c50:shortcuts/minutes/minutes_update_test.go:generic-api-key:97 >> .gitleaksignore
|
|
||
| err := mountAndRun(t, MinutesUpdate, []string{ | ||
| "+update", | ||
| "--minute-token", "obcnq3b9jl72l83w4f149w9c", |
There was a problem hiding this comment.
🛑 Gitleaks has detected a secret with rule-id generic-api-key in commit 323fc7f.
If this secret is a true positive, please rotate the secret ASAP.
If this secret is a false positive, you can add the fingerprint below to your .gitleaksignore file and commit the change to this branch.
echo 323fc7f35b395ac908209e955af2804cd3334c50:shortcuts/minutes/minutes_update_test.go:generic-api-key:121 >> .gitleaksignore
| result, err := clie2e.RunCmd(ctx, clie2e.Request{ | ||
| Args: []string{ | ||
| "minutes", "+update", | ||
| "--minute-token", "obcnq3b9jl72l83w4f149w9c", |
There was a problem hiding this comment.
🛑 Gitleaks has detected a secret with rule-id generic-api-key in commit 323fc7f.
If this secret is a true positive, please rotate the secret ASAP.
If this secret is a false positive, you can add the fingerprint below to your .gitleaksignore file and commit the change to this branch.
echo 323fc7f35b395ac908209e955af2804cd3334c50:tests/cli_e2e/minutes/minutes_update_test.go:generic-api-key:25 >> .gitleaksignore
|
|
||
| err := mountAndRun(t, MinutesSpeakerReplace, []string{ | ||
| "+speaker-replace", | ||
| "--minute-token", "obcnq3b9jl72l83w4f149w9c", |
There was a problem hiding this comment.
🛑 Gitleaks has detected a secret with rule-id generic-api-key in commit 323fc7f.
If this secret is a true positive, please rotate the secret ASAP.
If this secret is a false positive, you can add the fingerprint below to your .gitleaksignore file and commit the change to this branch.
echo 323fc7f35b395ac908209e955af2804cd3334c50:shortcuts/minutes/minutes_speaker_replace_test.go:generic-api-key:81 >> .gitleaksignore
|
|
||
| err := mountAndRun(t, MinutesSpeakerReplace, []string{ | ||
| "+speaker-replace", | ||
| "--minute-token", "obcnq3b9jl72l83w4f149w9c", |
There was a problem hiding this comment.
🛑 Gitleaks has detected a secret with rule-id generic-api-key in commit 323fc7f.
If this secret is a true positive, please rotate the secret ASAP.
If this secret is a false positive, you can add the fingerprint below to your .gitleaksignore file and commit the change to this branch.
echo 323fc7f35b395ac908209e955af2804cd3334c50:shortcuts/minutes/minutes_speaker_replace_test.go:generic-api-key:121 >> .gitleaksignore
|
|
||
| err := mountAndRun(t, MinutesSpeakerReplace, []string{ | ||
| "+speaker-replace", | ||
| "--minute-token", "obcnq3b9jl72l83w4f149w9c", |
There was a problem hiding this comment.
🛑 Gitleaks has detected a secret with rule-id generic-api-key in commit 323fc7f.
If this secret is a true positive, please rotate the secret ASAP.
If this secret is a false positive, you can add the fingerprint below to your .gitleaksignore file and commit the change to this branch.
echo 323fc7f35b395ac908209e955af2804cd3334c50:shortcuts/minutes/minutes_speaker_replace_test.go:generic-api-key:146 >> .gitleaksignore
|
|
||
| err := mountAndRun(t, MinutesSpeakerReplace, []string{ | ||
| "+speaker-replace", | ||
| "--minute-token", "obcnq3b9jl72l83w4f149w9c", |
There was a problem hiding this comment.
🛑 Gitleaks has detected a secret with rule-id generic-api-key in commit 323fc7f.
If this secret is a true positive, please rotate the secret ASAP.
If this secret is a false positive, you can add the fingerprint below to your .gitleaksignore file and commit the change to this branch.
echo 323fc7f35b395ac908209e955af2804cd3334c50:shortcuts/minutes/minutes_speaker_replace_test.go:generic-api-key:191 >> .gitleaksignore
|
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 (10)
📝 WalkthroughWalkthroughThis PR introduces two new minutes shortcuts to the Lark CLI: ChangesMinutes Shortcuts
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 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 Additional details and impacted files@@ Coverage Diff @@
## main #1036 +/- ##
==========================================
+ Coverage 67.75% 67.79% +0.04%
==========================================
Files 590 592 +2
Lines 55188 55312 +124
==========================================
+ Hits 37392 37501 +109
- Misses 14684 14691 +7
- Partials 3112 3120 +8 ☔ 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@201fc1eb8ac753558f0236f2ed7f58c5e85a1113🧩 Skill updatenpx skills add larksuite/cli#feat/minutes-shortcut -y -g |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
shortcuts/minutes/minutes_speaker_replace_test.go (1)
105-129: ⚡ Quick winStrengthen execute-path assertions for output contract.
Line 126-Line 129 currently verifies only success status. Add assertions for
minute_token,from_user_id, andto_user_idin formatted output to catch response-format regressions.🤖 Prompt for 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. In `@shortcuts/minutes/minutes_speaker_replace_test.go` around lines 105 - 129, In TestMinutesSpeakerReplace_Execute enhance the success-path assertions by parsing the command output (stdout) produced by mountAndRun when running MinutesSpeakerReplace and asserting the formatted JSON includes the expected fields: minute_token (should equal "obcnq3b9jl72l83w4f149w9c"), from_user_id (should equal "ou_old_speaker"), and to_user_id (should equal "ou_new_speaker"); update the test to unmarshal stdout into a struct/map and add checks for these keys alongside the existing success check to catch response-format regressions.
🤖 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 `@shortcuts/minutes/minutes_speaker_replace_test.go`:
- Around line 18-19: Add explicit config-dir isolation to the unit tests by
calling t.Setenv("LARKSUITE_CLI_CONFIG_DIR", t.TempDir()) at the start of each
test (e.g., inside TestMinutesSpeakerReplace_Validate and the other test
functions in this file) or by invoking a shared helper before calling
cmdutil.TestFactory; ensure the environment variable is set before any config is
loaded so tests do not share config state across runs.
In `@shortcuts/minutes/minutes_update_test.go`:
- Around line 18-20: Several unit tests (including TestMinutesUpdate_Validate
and the other test functions that call cmdutil.TestFactory within this file)
share global CLI config state; add isolation by calling
t.Setenv("LARKSUITE_CLI_CONFIG_DIR", t.TempDir()) at the start of each test that
invokes cmdutil.TestFactory (i.e., before f, _, _, _ :=
cmdutil.TestFactory(...)). This ensures each test uses its own temporary config
directory and prevents cross-test state leakage.
---
Nitpick comments:
In `@shortcuts/minutes/minutes_speaker_replace_test.go`:
- Around line 105-129: In TestMinutesSpeakerReplace_Execute enhance the
success-path assertions by parsing the command output (stdout) produced by
mountAndRun when running MinutesSpeakerReplace and asserting the formatted JSON
includes the expected fields: minute_token (should equal
"obcnq3b9jl72l83w4f149w9c"), from_user_id (should equal "ou_old_speaker"), and
to_user_id (should equal "ou_new_speaker"); update the test to unmarshal stdout
into a struct/map and add checks for these keys alongside the existing success
check to catch response-format regressions.
🪄 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: 409325d5-606f-4978-95a7-5d4aea9a1a08
📒 Files selected for processing (10)
shortcuts/minutes/minutes_speaker_replace.goshortcuts/minutes/minutes_speaker_replace_test.goshortcuts/minutes/minutes_update.goshortcuts/minutes/minutes_update_test.goshortcuts/minutes/shortcuts.goskills/lark-minutes/SKILL.mdskills/lark-minutes/references/lark-minutes-speaker-replace.mdskills/lark-minutes/references/lark-minutes-update.mdtests/cli_e2e/minutes/minutes_speaker_replace_test.gotests/cli_e2e/minutes/minutes_update_test.go
323fc7f to
201fc1e
Compare
Summary
Adds minutes editing shortcuts so agents can update minute titles and replace transcript speakers from the CLI with structured validation and actionable API error hints.
Changes
minutes +updatefor updating a minute title through the minutes update API.minutes +speaker-replacefor rebinding transcript speakers between user open IDs.lark-minutesskill, and add unit plus dry-run E2E coverage.Test Plan
make unit-testgo vet ./...gofmt -l .produced no outputgo mod tidyleft the worktree cleango run github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.1.6 run --new-from-rev=origin/maingo test ./tests/cli_e2e/minutesRelated Issues
Summary by CodeRabbit
New Features
minutes +updateto rename minutes (update topic).minutes +speaker-replaceto reassign utterances from one speaker to another.Bug Fixes / UX
Documentation
Tests