feat: implement json.Marshaler for CLEFEvent - #15
Conversation
|
Warning Review limit reached
More reviews will be available in 41 minutes and 8 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
Walkthrough
ChangesCLEFEvent custom marshaling and flusher integration
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 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. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (1)
event.go (1)
93-98: 💤 Low valueModifying map during iteration is safe here but fragile.
The escaping loop modifies
topLevelwhile iterating. This works because newly added@@-prefixed keys are excluded by the condition, but the pattern is subtle and could break if the logic changes.Consider iterating over a snapshot of the keys or the original
e.Properties:♻️ Suggested alternative
- // Escape any @ to @@ (according to specification). - for k, v := range topLevel { - if strings.HasPrefix(k, "@") && !strings.HasPrefix(k, "@@") { - topLevel["@"+k] = v - delete(topLevel, k) - } - } + // Escape any @ to @@ (according to specification). + for k, v := range e.Properties { + if strings.HasPrefix(k, "@") && !strings.HasPrefix(k, "@@") { + delete(topLevel, k) + topLevel["@"+k] = v + } + }
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: c276ad9f-19b1-4da8-b8e4-4847cdeba15f
📒 Files selected for processing (10)
.changes/v0.8.1.mdCHANGELOG.mdREADME.mdevent.goevent_test.goflusher.goflusher_test.gohandler.goseqotel/seqotel.gotool/tester/go.mod
💤 Files with no reviewable changes (1)
- flusher_test.go
Summary by CodeRabbit
New Features
Bug Fixes
Tests
Documentation
Chores