Skip to content

Removed unused Mirage emails config#28638

Merged
9larsons merged 2 commits into
TryGhost:mainfrom
PedroMarianoAlmeida:remove-unused-mirage-emails-config
Jun 17, 2026
Merged

Removed unused Mirage emails config#28638
9larsons merged 2 commits into
TryGhost:mainfrom
PedroMarianoAlmeida:remove-unused-mirage-emails-config

Conversation

@PedroMarianoAlmeida

@PedroMarianoAlmeida PedroMarianoAlmeida commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Got some code for us? Awesome 🎊!

Please take a minute to explain the change you're making:

  • Why are you making it?
    • ghost/admin/mirage/config/emails.js has been an empty Mirage config for around five years and does not register any routes. It is still imported and called from the test route setup, so removing it cleans up dead code without changing behavior.
  • What does it do?
    • Removes the unused emails Mirage config file and its import/call from routes-test.
  • Why is this something Ghost users or developers need?
    • It keeps the admin test Mirage setup smaller and avoids maintaining an empty mock hook that does not affect behavior.

Please check your PR against these items:

  • I've read and followed the Contributor Guide
  • I've explained my change
  • I've written an automated test to prove my change works (N/A)

We appreciate your contribution! 🙏

no ref

The emails mock did not register any routes, so keeping it wired into the test Mirage setup only added dead code.
@coderabbitai

coderabbitai Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

This change removes the Mirage email mock fixture implementation from the admin test configuration. The mockEmails default export is deleted from ghost/admin/mirage/config/emails.js. The Mirage route test setup is also updated to stop importing that fixture and to stop calling mockEmails(this) during initialization, while the remaining Mirage configuration and route handlers stay the same.

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: removing unused Mirage emails configuration from the codebase.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description check ✅ Passed The description clearly explains why the changes are being made, what they do, and their value to the project. It directly addresses the removal of unused Mirage configuration code.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@9larsons 9larsons enabled auto-merge (squash) June 17, 2026 15:11
@nx-cloud

nx-cloud Bot commented Jun 17, 2026

Copy link
Copy Markdown

🤖 Nx Cloud AI Fix

Ensure the fix-ci command is configured to always run in your CI pipeline to get automatic fixes in future runs. For more information, please see https://nx.dev/ci/features/self-healing-ci


View your CI Pipeline Execution ↗ for commit faab5fc

Command Status Duration Result
nx run ghost-admin:test ✅ Succeeded 2m 39s View ↗
nx run @tryghost/admin:build ✅ Succeeded 2m 6s View ↗
nx run ghost:build:assets ✅ Succeeded 2s View ↗
nx run ghost:build:tsc ✅ Succeeded 6s View ↗
nx run-many -t lint -p ghost-admin ✅ Succeeded 19s View ↗
nx run-many --target=build --projects=@tryghost... ✅ Succeeded <1s View ↗

💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗


☁️ Nx Cloud last updated this comment at 2026-06-17 17:03:32 UTC

@9larsons 9larsons merged commit 3957988 into TryGhost:main Jun 17, 2026
38 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