Skip to content

Convert importer email template to TypeScript#28238

Merged
EvanHahn merged 1 commit into
mainfrom
convert-importer-email-template-to-ts
May 28, 2026
Merged

Convert importer email template to TypeScript#28238
EvanHahn merged 1 commit into
mainfrom
convert-importer-email-template-to-ts

Conversation

@EvanHahn
Copy link
Copy Markdown
Contributor

no ref

This change should have no user impact.

no ref

This change should have no user impact.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 28, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: e317241b-4678-4d60-ae44-196da1f5abd5

📥 Commits

Reviewing files that changed from the base of the PR and between 2c6439e and 47e8429.

📒 Files selected for processing (2)
  • ghost/core/core/server/data/importer/email-template.ts
  • ghost/core/core/server/data/importer/import-manager.js

Walkthrough

This PR modernizes the email-template module by converting it from CommonJS to an ES module with TypeScript typing. The email-template.ts file now exports emailTemplate as a named export with input parameters typed via ReadonlyDeep<EmailTemplateData>, where siteUrl and postsUrl are explicitly typed as URL. The corresponding import in import-manager.js is updated from a default require to named destructuring to match the new export format. The template's conditional logic for rendering "Import unsuccessful" or "View posts" sections remains unchanged.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: converting the importer email template from JavaScript/CommonJS to TypeScript with ES module syntax.
Description check ✅ Passed The description is related to the changeset, confirming this is a conversion to TypeScript with no user impact, which aligns with the code changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch convert-importer-email-template-to-ts

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.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 28, 2026

Actionable comments posted: 0

@EvanHahn EvanHahn merged commit 4e17101 into main May 28, 2026
49 checks passed
@EvanHahn EvanHahn deleted the convert-importer-email-template-to-ts branch May 28, 2026 21:04
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