-
-
Notifications
You must be signed in to change notification settings - Fork 11.3k
Added automated_email bookshelf model
#25495
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added automated_email bookshelf model
#25495
Conversation
WalkthroughThis pull request introduces a new Bookshelf model for AutomatedEmail, adding support for managing automated emails with a default inactive status. The model includes parse and formatOnWrite hooks to handle lexical URL transformations during storage and retrieval operations. A comprehensive unit test file validates the model's defaults behavior, URL parsing functionality, and URL formatting on write operations. Estimated code review effort🎯 2 (Simple) | ⏱️ ~15 minutes
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
🧰 Additional context used🧠 Learnings (7)📚 Learning: 2025-11-25T14:28:50.351ZApplied to files:
📚 Learning: 2025-03-13T09:00:20.205ZApplied to files:
📚 Learning: 2025-03-13T09:00:20.205ZApplied to files:
📚 Learning: 2025-11-24T17:29:43.865ZApplied to files:
📚 Learning: 2025-11-24T17:29:43.865ZApplied to files:
📚 Learning: 2025-11-24T17:29:43.865ZApplied to files:
📚 Learning: 2025-05-29T07:45:35.714ZApplied to files:
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (12)
🔇 Additional comments (10)
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 |
0a07b79 to
cd97fb0
Compare
81d3458 to
0947e94
Compare
cd97fb0 to
8abdaeb
Compare
af2f8a5 to
f9be63c
Compare
8abdaeb to
d5a0316
Compare
automated_email bookshelf model
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds a new AutomatedEmail bookshelf model to enable CRUD operations on the automated_emails table, which will store customizable welcome email content for new members with lexical field support.
- Implements the
AutomatedEmailmodel with URL transformation for lexical content fields - Includes comprehensive unit tests covering defaults, URL parsing, and formatting operations
- Follows established patterns from similar models (snippet, post) for lexical field URL transformations
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| ghost/core/core/server/models/automated-email.js | Implements the AutomatedEmail model with table mapping, default status, and URL transformation methods (parse/formatOnWrite) for lexical fields |
| ghost/core/test/unit/server/models/automated-email.test.js | Adds comprehensive unit tests for defaults, parse() URL transformations, and formatOnWrite() URL transformations including edge cases (null/undefined) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
troyciesco
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cmraible this one LGTM once its blocking PR is merged 👍
315909d to
913bba0
Compare
a2f0f1a to
4c045e2
Compare
ref https://linear.app/ghost/issue/NY-771 This model enables CRUD operations on the automated_emails table, which will store customizable welcome email content for new members. Includes URL transformation for the lexical field to handle __GHOST_URL__ placeholders consistently with other models like posts.
4c045e2 to
436338c
Compare
ref https://linear.app/ghost/issue/NY-771
This model enables CRUD operations on the automated_emails table, which will store customizable welcome email content for new members. Includes URL transformation for the lexical field to handle GHOST_URL placeholders consistently with other models like posts.