Skip to content

Added paid subscription changed trigger to add automation endpoint - #32182

Draft
cmraible wants to merge 2 commits into
evanhahn-ny-1724-update-database-schema-to-support-paid-subscription-changedfrom
codex/ny-1726-add-paid-subscription-trigger
Draft

cmraible wants to merge 2 commits into
evanhahn-ny-1724-update-database-schema-to-support-paid-subscription-changedfrom
codex/ny-1726-add-paid-subscription-trigger

Conversation

@cmraible

@cmraible cmraible commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

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

Summary

  • Add paid_subscription_changed to the create automation endpoint, including validation for the source and destination paid tiers.
  • Store subscription transition scopes and tier links when creating an automation, while preserving the legacy membership-started payload.
  • Cover validation, database writes, and the Admin API response with unit and API end-to-end 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 da7b4a6

Command Status Duration Result
nx run ghost:test:ci:integration ✅ Succeeded 2m 32s View ↗
nx run ghost:test:integration ✅ Succeeded 1m 57s View ↗
nx run ghost:test:ci:e2e ✅ Succeeded 5m 31s View ↗
nx run ghost:test:e2e ✅ Succeeded 3m 59s View ↗
nx run ghost:test:legacy ✅ Succeeded 2m 4s View ↗
nx run ghost:test:ci:unit ✅ Succeeded 1m 34s View ↗
nx run-many -t test:unit -p ghost,@internal/scr... ✅ Succeeded 57s View ↗
nx run ghost-monorepo:lint:boundaries ✅ Succeeded 23s 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:01:41 UTC

@codecov

codecov Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 77.14286% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.48%. Comparing base (4a3588e) to head (da7b4a6).

Files with missing lines Patch % Lines
...ces/automations/database-automations-repository.ts 72.41% 7 Missing and 1 partial ⚠️
Additional details and impacted files
@@                                               Coverage Diff                                                @@
##           evanhahn-ny-1724-update-database-schema-to-support-paid-subscription-changed   #32182      +/-   ##
================================================================================================================
+ Coverage                                                                         85.24%   85.48%   +0.24%     
================================================================================================================
  Files                                                                              1398     1398              
  Lines                                                                             52426    52446      +20     
  Branches                                                                           9006     9011       +5     
================================================================================================================
+ Hits                                                                              44690    44833     +143     
+ Misses                                                                             6630     6502     -128     
- Partials                                                                           1106     1111       +5     
Flag Coverage Δ
e2e-tests 72.70% <68.57%> (+0.16%) ⬆️
unit-tests 68.10% <40.00%> (+0.06%) ⬆️

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.

@cmraible
cmraible added this pull request to stack #32092 October 22, 2026 18:53
no ref

The exhaustive status check is independent of the new trigger and belongs in a separate pull request.

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