Skip to content

Stopped paid subscription changed automations early when members no longer match - #32186

Draft
cmraible wants to merge 1 commit into
codex/ny-1726-add-paid-subscription-triggerfrom
codex/ny-1725-stop-subscription-automations-early
Draft

cmraible wants to merge 1 commit into
codex/ny-1726-add-paid-subscription-triggerfrom
codex/ny-1725-stop-subscription-automations-early

Conversation

@cmraible

@cmraible cmraible commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

closes https://linear.app/ghost/issue/NY-1725

Summary

  • Load each queued step's current subscription destination scope and selected destination tiers.
  • Stop a paid subscription changed automation when the member no longer matches its destination before running a wait or sending an email.
  • Cover destination tier changes and member status changes in unit and database integration tests.

@coderabbitai

coderabbitai Bot commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@nx-cloud

nx-cloud Bot commented Oct 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 784f226

Command Status Duration Result
nx run ghost:test:ci:integration ✅ Succeeded 2m 30s View ↗
nx run ghost:test:integration ✅ Succeeded 1m 54s View ↗
nx run ghost:test:ci:e2e ✅ Succeeded 5m 17s View ↗
nx run ghost:test:e2e ✅ Succeeded 3m 52s View ↗
nx run ghost:test:legacy ✅ Succeeded 1m 40s View ↗
nx run ghost:test:ci:unit ✅ Succeeded 1m 5s View ↗
nx run-many -t test:unit -p ghost ✅ Succeeded 51s View ↗
nx run @tryghost/admin:build ✅ Succeeded 3s View ↗
Additional runs (6) ✅ Succeeded ... View ↗

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


☁️ Nx Cloud last updated this comment at 2026-10-22 20:24:35 UTC

@cmraible
cmraible added this pull request to stack #32092 October 22, 2026 20:16
@codecov

codecov Bot commented Oct 22, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 77.77778% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.47%. Comparing base (da7b4a6) to head (784f226).

Files with missing lines Patch % Lines
ghost/core/server/services/automations/poll.ts 54.54% 5 Missing ⚠️
...ces/automations/database-automations-repository.ts 88.00% 3 Missing ⚠️
Additional details and impacted files
@@                               Coverage Diff                               @@
##           codex/ny-1726-add-paid-subscription-trigger   #32186      +/-   ##
===============================================================================
- Coverage                                        85.48%   85.47%   -0.01%     
===============================================================================
  Files                                             1398     1398              
  Lines                                            52446    52477      +31     
  Branches                                          9011     9015       +4     
===============================================================================
+ Hits                                             44833    44857      +24     
- Misses                                            6502     6523      +21     
+ Partials                                          1111     1097      -14     
Flag Coverage Δ
e2e-tests 72.56% <61.11%> (-0.15%) ⬇️
unit-tests 68.07% <69.44%> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

This branch has not been deployed

No deployments
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