-
Notifications
You must be signed in to change notification settings - Fork 0
Changed member welcome email job to run based on config #30
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
base: coderabbit_combined_20260121_augment_sentry_coderabbit_1_base_changed_member_welcome_email_job_to_run_based_on_config_pr246
Are you sure you want to change the base?
Changes from all commits
6d57f83
3fa71dd
5d1fdee
ca932dd
30dff3b
96cac63
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -8,6 +8,7 @@ const ObjectId = require('bson-objectid').default; | |||||||||
| const {NotFoundError} = require('@tryghost/errors'); | ||||||||||
| const validator = require('@tryghost/validator'); | ||||||||||
| const crypto = require('crypto'); | ||||||||||
| const config = require('../../../../../shared/config'); | ||||||||||
|
|
||||||||||
| const messages = { | ||||||||||
| noStripeConnection: 'Cannot {action} without a Stripe Connection', | ||||||||||
|
|
@@ -336,8 +337,9 @@ module.exports = class MemberRepository { | |||||||||
| const eventData = _.pick(data, ['created_at']); | ||||||||||
|
|
||||||||||
| const memberAddOptions = {...(options || {}), withRelated}; | ||||||||||
| let member; | ||||||||||
| if (this._labsService.isSet('welcomeEmails') && WELCOME_EMAIL_SOURCES.includes(source)) { | ||||||||||
| var member; | ||||||||||
| const welcomeEmailConfig = config.get('memberWelcomeEmailTestInbox'); | ||||||||||
| if (welcomeEmailConfig || WELCOME_EMAIL_SOURCES.includes(source)) { | ||||||||||
|
Comment on lines
+341
to
+342
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Require config and allowed source to gate welcome-email outbox creation. Using 🐛 Proposed fix- if (welcomeEmailConfig || WELCOME_EMAIL_SOURCES.includes(source)) {
+ if (welcomeEmailConfig && WELCOME_EMAIL_SOURCES.includes(source)) {📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||
| const runMemberCreation = async (transacting) => { | ||||||||||
| const newMember = await this._Member.add({ | ||||||||||
| ...memberData, | ||||||||||
|
|
||||||||||
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.
🧩 Analysis chain
🏁 Script executed:
Repository: qodo-benchmark/Ghost-combined-coderabbit
Length of output: 887
🏁 Script executed:
Repository: qodo-benchmark/Ghost-combined-coderabbit
Length of output: 841
🏁 Script executed:
Repository: qodo-benchmark/Ghost-combined-coderabbit
Length of output: 5722
🏁 Script executed:
Repository: qodo-benchmark/Ghost-combined-coderabbit
Length of output: 168
Replace
varwithletto comply with ESLint'sno-varrule.The
no-varrule is set to error level in the ghost/core ESLint configuration, which will cause CI to fail.Proposed fix
📝 Committable suggestion
🧰 Tools
🪛 ESLint
[error] 340-340: Unexpected var, use let or const instead.
(no-var)
🤖 Prompt for AI Agents