Skip to content

Logged when member has unsubscribed from automations emails#28790

Merged
cmraible merged 3 commits into
mainfrom
log-for-no-updates-and-announcements
Jun 22, 2026
Merged

Logged when member has unsubscribed from automations emails#28790
cmraible merged 3 commits into
mainfrom
log-for-no-updates-and-announcements

Conversation

@EvanHahn

Copy link
Copy Markdown
Contributor

no ref

This could be helpful when investigating issues in the future.

no ref

This could be helpful when investigating issues in the future.
@EvanHahn EvanHahn requested a review from cmraible June 22, 2026 17:12
@coderabbitai

coderabbitai Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

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: 8a7a3642-1d19-491c-bb45-72675116e666

📥 Commits

Reviewing files that changed from the base of the PR and between 14c786f and 2c9053d.

📒 Files selected for processing (1)
  • ghost/core/core/server/services/automations/poll.ts

Walkthrough

In poll.ts, a logging.info call is added to the send_email branch of processStep. When hasUpdatesAndAnnouncementsEnabled(member) returns false, the new log emits the event automations.poll.skipped_unsubscribed_member with member_id and step_id before the existing fast-finish break. No interfaces, exports, or existing control-flow paths are modified.

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change - adding a log when a member has unsubscribed from automations emails, matching the core functionality in the changeset.
Description check ✅ Passed The description is related to the changeset, explaining the purpose of the logging addition and noting it's helpful for future issue investigation.
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 log-for-no-updates-and-announcements

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.

@nx-cloud

nx-cloud Bot commented Jun 22, 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 2c9053d

Command Status Duration Result
nx run ghost:test:ci:integration:no-coverage ✅ Succeeded 2m 18s View ↗
nx run ghost:test:ci:integration ✅ Succeeded 2m 2s View ↗
nx build @tryghost/activitypub ✅ Succeeded 3s View ↗
nx build @tryghost/admin-toolbar ✅ Succeeded <1s View ↗
nx build @tryghost/announcement-bar ✅ Succeeded <1s View ↗
nx build @tryghost/comments-ui ✅ Succeeded <1s View ↗
nx build @tryghost/portal ✅ Succeeded <1s View ↗
nx build @tryghost/signup-form ✅ 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 19:33:12 UTC

cmraible added 2 commits June 22, 2026 15:22
Skipping a send_email action if a member has previously unsubscribed
isn't an unexpected condition, so this should be an info log instead of
a warn.
`skipped_unsubscribed_member`

This event occurs during the send_email action, if the member has
unsubscribed. `skipped_unsubscribed_member` is more semantically
correct. `member_unsubscribed` should be reserved for the event when a
member actually unsubscribes.
Comment thread ghost/core/core/server/services/automations/poll.ts Outdated
Comment thread ghost/core/core/server/services/automations/poll.ts Outdated
@cmraible cmraible enabled auto-merge (squash) June 22, 2026 19:27
@cmraible cmraible merged commit 3c8576d into main Jun 22, 2026
49 checks passed
@cmraible cmraible deleted the log-for-no-updates-and-announcements branch June 22, 2026 19:42
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