Skip to content

Added instructions for bypassing mailpit with local dev#26657

Merged
9larsons merged 1 commit intomainfrom
add-mg-script
Mar 2, 2026
Merged

Added instructions for bypassing mailpit with local dev#26657
9larsons merged 1 commit intomainfrom
add-mg-script

Conversation

@9larsons
Copy link
Contributor

@9larsons 9larsons commented Mar 2, 2026

no ref

  • added yarn dev:mailgun script to bypass mailpit when needing to use a real service for testing trx emails

no ref
- added yarn dev:mailgun script to bypass mailpit when needing to use a real service for testing trx emails
@9larsons 9larsons enabled auto-merge (squash) March 2, 2026 22:28
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 2, 2026

Walkthrough

This pull request adds Mailgun SMTP integration support for development environments. It introduces MAILGUN_SMTP_USER and MAILGUN_SMTP_PASS placeholders in the environment example file. A new Docker Compose configuration file (compose.dev.mailgun.yaml) is added, defining a Ghost service with Mailgun SMTP settings including transport protocol, host, port, and authentication credentials. Additionally, a new npm script dev:mailgun is introduced to enable running the development environment with this Mailgun-specific configuration.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: adding a way to bypass mailpit during local development, which is the core purpose of the PR.
Description check ✅ Passed The description is related to the changeset and provides context about the yarn dev:mailgun script and its purpose for testing with Mailgun instead of mailpit.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch add-mg-script

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
compose.dev.mailgun.yaml (1)

9-10: Use fail-fast variable expansion to catch missing SMTP credentials at startup.

On lines 9-10, plain interpolation ${VAR} allows empty credentials and causes confusing runtime mail failures. Use Docker Compose's required-variable syntax so startup fails immediately with a clear error:

-      mail__options__auth__user: ${MAILGUN_SMTP_USER}
-      mail__options__auth__pass: ${MAILGUN_SMTP_PASS}
+      mail__options__auth__user: ${MAILGUN_SMTP_USER:?Set MAILGUN_SMTP_USER in .env}
+      mail__options__auth__pass: ${MAILGUN_SMTP_PASS:?Set MAILGUN_SMTP_PASS in .env}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@compose.dev.mailgun.yaml` around lines 9 - 10, Replace the plain variable
interpolations for SMTP credentials with Docker Compose's required-variable
syntax so the service fails fast on missing creds: change the
mail__options__auth__user and mail__options__auth__pass values from
${MAILGUN_SMTP_USER} and ${MAILGUN_SMTP_PASS} to the required form (e.g.,
${MAILGUN_SMTP_USER:?MAILGUN_SMTP_USER required} and
${MAILGUN_SMTP_PASS:?MAILGUN_SMTP_PASS required}) so startup errors clearly if
either is unset.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@compose.dev.mailgun.yaml`:
- Around line 9-10: Replace the plain variable interpolations for SMTP
credentials with Docker Compose's required-variable syntax so the service fails
fast on missing creds: change the mail__options__auth__user and
mail__options__auth__pass values from ${MAILGUN_SMTP_USER} and
${MAILGUN_SMTP_PASS} to the required form (e.g.,
${MAILGUN_SMTP_USER:?MAILGUN_SMTP_USER required} and
${MAILGUN_SMTP_PASS:?MAILGUN_SMTP_PASS required}) so startup errors clearly if
either is unset.

ℹ️ Review info

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between abcd9c3 and 06be5ab.

📒 Files selected for processing (3)
  • .env.example
  • compose.dev.mailgun.yaml
  • package.json

@9larsons 9larsons merged commit 3d562b1 into main Mar 2, 2026
33 checks passed
@9larsons 9larsons deleted the add-mg-script branch March 2, 2026 22:56
@codecov
Copy link

codecov bot commented Mar 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.24%. Comparing base (abcd9c3) to head (06be5ab).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #26657   +/-   ##
=======================================
  Coverage   73.24%   73.24%           
=======================================
  Files        1528     1528           
  Lines      120335   120335           
  Branches    14544    14544           
=======================================
  Hits        88134    88134           
- Misses      31182    31198   +16     
+ Partials     1019     1003   -16     
Flag Coverage Δ
admin-tests 54.06% <ø> (ø)
e2e-tests 73.24% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

1 participant