fix: read release error_logs from data.error_logs in apps +release-get#1436
Conversation
|
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 (2)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughAdds passthrough of a top-level ChangesError logs field passthrough in release-get output
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 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✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1436 +/- ##
==========================================
+ Coverage 72.83% 72.89% +0.06%
==========================================
Files 732 733 +1
Lines 69140 69207 +67
==========================================
+ Hits 50356 50447 +91
+ Misses 15003 14977 -26
- Partials 3781 3783 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
🚀 PR Preview Install Guide🧰 CLI updatenpm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@8d42d0818fadda29da7c88cf15aabc7eaae6aa5e🧩 Skill updatenpx skills add larksuite/cli#fix/apps-release-get-error-logs -y -g |
f0fdcc6 to
8d42d08
Compare
Summary
apps +release-getread the release error logs fromdata.release.error_logs, but per the interface doc (app.release/get.yml) the response placesreleaseanderror_logsas two sibling fields underdata. As a result the default JSON output droppeddata.error_logsentirely, and the prettyfailedtable was always empty.Changes
shortcuts/apps/apps_release_get.go: after unwrappingdata.releaseinto the flattened output object, graft the siblingdata.error_logsonto it so both JSON and pretty output surface the real error logs. The flattened-output contract for the release fields is unchanged.shortcuts/apps/apps_release_get_test.go: correct the failed-release mocks to placeerror_logsas a sibling ofrelease(matching the real API), and add JSON-passthrough and no-key-when-absent assertions.Test Plan
make unit-testpassed (go test ./shortcuts/apps/ -run TestAppsReleaseGet→ 13/13)apps +release-get --helpandapps +release-get --app-id <id> --release-id <id> --dry-run— flag validation and identity/error handling confirmed; failed-release error_logs behavior covered by unit tests (a failed release cannot be constructed against a live backend)Related Issues
N/A
Summary by CodeRabbit