Skip to content

feat: add RESEND_API_KEY environment variable support#109

Merged
filipetoscano merged 1 commit into
mainfrom
feat/env-api-key
May 3, 2026
Merged

feat: add RESEND_API_KEY environment variable support#109
filipetoscano merged 1 commit into
mainfrom
feat/env-api-key

Conversation

@drish

@drish drish commented May 1, 2026

Copy link
Copy Markdown
Member
  • Constructor now falls back to RESEND_API_KEY env var when ApiToken is not set.
  • New ResendClient.Create() no-arg factory reads the env var and throws InvalidOperationException if absent.

Summary by cubic

ResendClient now falls back to the RESEND_API_KEY environment variable when ApiToken isn’t set. Also adds a no-arg ResendClient.Create() that reads the env var and throws if missing.

  • New Features
    • Constructor uses RESEND_API_KEY if ApiToken is empty.
    • Added ResendClient.Create() that reads RESEND_API_KEY; throws InvalidOperationException when absent.
    • Tests cover env fallback, no-arg success, and error case.

Written for commit 6b0e17a. Summary will update on new commits.

Constructor now falls back to RESEND_API_KEY env var when ApiToken is
not set. New ResendClient.Create() no-arg factory reads the env var
and throws InvalidOperationException if absent.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Auto-approved: Adds standard environment variable fallback for API keys and a helper factory method. Low-risk change with comprehensive test coverage.

@filipetoscano filipetoscano merged commit 0af0cfe into main May 3, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants