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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
馃悰 Fixed 'comped' flag behavior in Member API #15030
馃悰 Fixed 'comped' flag behavior in Member API #15030
Conversation
closes TryGhost/Product#1674 - The comped flag in Members API unintentionally stopped working when v3 API was dropped with the release of Ghost v5. The flag is deprecated but should be back-compatible for now - we don't want to break integratons like Zapier. - To properly deprecate the flag we need to plan it's removal and start signalling about it through the version headers
Codecov Report
@@ Coverage Diff @@
## main #15030 +/- ##
==========================================
+ Coverage 61.07% 61.09% +0.02%
==========================================
Files 593 596 +3
Lines 47557 47649 +92
Branches 4271 4290 +19
==========================================
+ Hits 29044 29112 +68
- Misses 18464 18488 +24
Partials 49 49
Continue to review full report at Codecov.
|
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.
The issue with MemberPaidSubscriptionEvent
was that we had two Stripe Subscriptions with the same ID. This wasn't an issue in the past, because the subscription was ignored while the comped
flag was removed. Now that started to cause some issues internally in the second test (because the subscription already existed and didn't change, so it didn't need to create the MemberPaidSubscriptionEvent). By using a new subscription id, it now creates a new subscription internally and also a new MemberPaidSubscriptionEvent.
+ I also bumped package.json
to test this locally
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.
Thanks @SimonBackx for sorting the tests!
closes https://github.com/TryGhost/Team/issues/1674
refs TryGhost/Members#407
@allouis @SimonBackx marking you for the review as this change has triggered quite a few rewrites in the member test snapshots. The most unexpected one is the format change in the
MemberPaidSubscriptionEvent
event test. The rest seems like an expected change. It's the territory I have not touched in a long while, so would be great to get 2x:eyes: over the change :pray: