Validated automation email senders consistently#28794
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
WalkthroughA new 🚥 Pre-merge checks | ✅ 4✅ 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 |
|
| Command | Status | Duration | Result |
|---|---|---|---|
nx run ghost:test:ci:integration |
✅ Succeeded | 2m 13s | View ↗ |
nx run ghost:test:ci:integration:no-coverage |
✅ Succeeded | 2m 21s | View ↗ |
nx build @tryghost/comments-ui |
✅ Succeeded | <1s | View ↗ |
nx build @tryghost/admin-toolbar |
✅ Succeeded | <1s | View ↗ |
nx build @tryghost/signup-form |
✅ Succeeded | <1s | View ↗ |
nx run ghost:test:ci:legacy |
✅ Succeeded | 2m 48s | View ↗ |
nx build @tryghost/sodo-search |
✅ Succeeded | <1s | View ↗ |
nx build @tryghost/activitypub |
✅ Succeeded | 1s | View ↗ |
Additional runs (10) |
✅ Succeeded | ... | View ↗ |
💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗
☁️ Nx Cloud last updated this comment at 2026-06-22 20:56:52 UTC
|
| Command | Status | Duration | Result |
|---|---|---|---|
nx run ghost:test:ci:integration:no-coverage |
✅ Succeeded | 2m 25s | View ↗ |
nx run ghost:test:ci:integration |
✅ Succeeded | 2m 3s | View ↗ |
nx run ghost:test:ci:legacy |
✅ Succeeded | 2m 55s | View ↗ |
nx run ghost:test:ci:e2e:no-coverage |
✅ Succeeded | 2m 22s | View ↗ |
nx run ghost:test:ci:e2e |
✅ Succeeded | 2m 29s | View ↗ |
nx build @tryghost/admin-toolbar |
✅ Succeeded | <1s | View ↗ |
nx build @tryghost/portal |
✅ Succeeded | <1s | View ↗ |
nx build @tryghost/comments-ui |
✅ Succeeded | <1s | View ↗ |
Additional runs (10) |
✅ Succeeded | ... | View ↗ |
💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗
☁️ Nx Cloud last updated this comment at 2026-06-22 18:32:15 UTC
There was a problem hiding this comment.
🧹 Nitpick comments (1)
ghost/core/test/e2e-api/admin/automated-emails.test.js (1)
278-313: 🧹 Nitpick | 🔵 Trivial | ⚡ Quick winAdd an add-path test for
sender_reply_toverification-required rejection.You already cover this branch on edit, but not on add. Adding the symmetric add case would lock coverage for both controller entry points.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@ghost/core/test/e2e-api/admin/automated-emails.test.js` around lines 278 - 313, Create a new test case in the same file following the pattern of the existing Rejects disallowed sender email on add test, but instead test the scenario where sender_reply_to verification is required. The new test should stub the emailAddressService.service.validate method to return verificationEmailRequired: true for the sender_reply_to field, verify that the POST to automated_emails with sender_reply_to set rejects with status 422, assert that validateStub was called with the sender_reply_to email and 'reply-to' as parameters, and confirm the email_design_settings in the database were not modified with the new sender_reply_to value.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@ghost/core/test/e2e-api/admin/automated-emails.test.js`:
- Around line 278-313: Create a new test case in the same file following the
pattern of the existing Rejects disallowed sender email on add test, but instead
test the scenario where sender_reply_to verification is required. The new test
should stub the emailAddressService.service.validate method to return
verificationEmailRequired: true for the sender_reply_to field, verify that the
POST to automated_emails with sender_reply_to set rejects with status 422,
assert that validateStub was called with the sender_reply_to email and
'reply-to' as parameters, and confirm the email_design_settings in the database
were not modified with the new sender_reply_to value.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 5866b2c5-d485-4a68-aab2-4c52abeee052
📒 Files selected for processing (6)
ghost/core/core/server/api/endpoints/automated-email-design.jsghost/core/core/server/api/endpoints/automated-emails.jsghost/core/core/server/api/endpoints/utils/validate-email-sender-fields.tsghost/core/test/e2e-api/admin/automated-email-design.test.jsghost/core/test/e2e-api/admin/automated-emails.test.jsghost/core/test/unit/api/endpoints/utils/validate-email-sender-fields.test.ts
closes https://linear.app/ghost/issue/NY-1349 Before this change, a few endpoints weren't validating email sender/reply-to. Now, they all do.

closes https://linear.app/ghost/issue/NY-1349
Before this change, a few endpoints weren't validating email sender/reply-to.
Now, they all do.