Repository navigation
feat(events): accept an idempotency key when sending an event - #276
NicolasLopes7 wants to merge 2 commits into
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
All reported issues were addressed across 5 files
Reply with feedback, questions, or to request a fix.
View guided diff | Re-trigger cubic
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@cubic-dev-ai both issues from your review are fixed in c318454: example steps renumbered (10–14), and the new spec renamed to |
@NicolasLopes7 Both fixes are in place in c318454 — confirmed:
Nothing else jumps out. The Tip: get faster answers by chatting with cubic’s review copilot in the review UI |
klotty
left a comment
There was a problem hiding this comment.
0 issues found across 2 files (changes from recent commits).
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Auto-approved: Adds optional idempotency-key support to Resend::Events.send via an options keyword, with an example and version bump. The diff is a small, backward-compatible additive change with a focused spec; non-options callers are unaffected.
View guided diff | Re-trigger cubic
Summary
Resend::Events.sendnow takes anoptions:keyword, andoptions: { idempotency_key: "..." }sends theIdempotency-Keyheader onPOST /events/send. It uses the same option name and header code asResend::Emails.sendandResend::Batch.send. Callers that don't passoptions:see no change.The API has accepted
Idempotency-Keyon this endpoint since Dec 3 (contract: resend/resend-docs#2039). This matches resend-node'sresend.events.send(payload, { idempotencyKey })from resend/resend-node#1205.Also adds this call to
examples/events.rband bumps the version to 1.23.0, as recent feature PRs do.Testing
spec/events_spec.rbchecks that the header is sent when a key is given. It fails without thelibchange.bundle exec rake spec: 497 examples, 0 failures (Ruby 4.0.9)bundle exec rubocop: no offenses🤖 Generated with Claude Code
Summary by cubic
Resend::Events.sendnow accepts anoptions:keyword so callers can pass an idempotency key, which is sent as theIdempotency-Keyheader onPOST /events/send. This mirrors howResend::Emails.sendandResend::Batch.sendalready handle idempotency keys, and callers that don't passoptions:see no change.options:keyword tosendand forwards it to the underlying request.examples/events.rbwith an idempotent event example and bumps the gem version to 1.23.0.Written for commit c318454. Summary will update on new commits.