[pull] main from TryGhost:main - #1422
Merged
Merged
Conversation
closes https://linear.app/ghost/issue/NY-1527 Before this change, if a member unsubscribed from automation emails, `send_email` steps would be no-ops. Every step would run, but emails wouldn't be sent. After this change, the automation is stopped. ## Manual test In addition to automated tests, I also did a manual test. 1. I set up an automation with 3 emails separated by 1 day waits. (I configured things so that 1 day got shortened to 15 seconds, for testing.) 2. I signed up and verified that I got the first email. 3. I unsubscribed. 4. After ~15 seconds, I got no email. And the data in the database looked correct. Screencast (no audio): https://github.com/user-attachments/assets/6f1e6512-093d-4bfe-bfc3-24a353bc632f
no ref Most of the `ignoreDeps` entries in `.github/renovate.json5` dated from 2019–2020 and their reasons no longer hold, so they were either silently holding back updates or doing nothing. This prunes the list to entries with a live reason and refreshes the kept comments. No dependency versions change in this PR — Renovate will open the usual PRs for anything newly unignored.
ref #29182 This change should have no user impact. This renames `email_batches.provider_id` to `email_batches.mailgun_message_id`. Two benefits: - Clarity (several of us have been confused by this name) - Matches the `automated_email_recipients` table (see #29182) This also changes its usage on the frontend. Normally I'd be more careful about this change--after all, it's a breaking API change--but it only affects a debug view.
no ref - update jsdom to v30 - update metascraper to latest Updating metascraper to latest ensures we pull in an updated version of `re2` - the latest version of re2 fixes an issue where the shipped binaries weren't `stripped`, meaning the binary was ~20mb larger than it needed to be. Updates jsdom alongside it to ensure that we aren't pulling in two different jsdom versions.
fixes #30001 Got 13 can terminate the Ghost process when a redirect clears the active request while a body write callback is still outstanding. The stale callback then dereferences `request.destroyed` after the request has gone away.
no ref Admin's limit service loaded limits without the `subscription` argument that @tryghost/limit-service requires for periodic limits, so any configured maxPeriodic limit threw an IncorrectUsageError in the browser. Loading stops at the first limit that can't be built, so a site with an emails limit ended up with no limits registered at all, and the rejection surfaced in the editor's publish flow. - passes the subscription through, resolved from hostSettings the same way the server does - adds a client-side count query for emails, since the default one counts recipients via knex - skips the emails check for authors and contributors, who can't browse emails, matching how the members limit is already handled - tolerates a limit that can't be built instead of leaving Admin with none
…29843) no ref Every limit dialogue sent people to Ghost(Pro)'s billing app at a hardcoded '/pro', so a managed host running its own billing had no way to redirect them. Adds hostSettings.billing.upgradeUrl, read through a shared helper alongside the existing upgradeUrl settings for the pre-launch and trial banners. Each surface keeps its own fallback so Ghost(Pro) lands where it always has: the publish-limit modal still opens checkout, and the inline publish messages still point at the billing root. hostSettings holds an href, so the React hook drops a leading '#' before handing it to updateRoute(), which reads that as an internal route.
no ref - bump mongo-knex/nql/nql-lang to latest - override nql/nql-lang to catalog versions to deduplicate
towards https://linear.app/ghost/issue/NY-1522 This change should have no user impact, but makes it possible to create thousands of email batches. Co-Authored-By: Chris Raible <chris@ghost.org>
no ref - update @tryghost/metrics to latest - update framework packages to deduplicate versions
towards https://linear.app/ghost/issue/NY-1522 This change should have no user impact, and fixes an error with the data importer. Co-Authored-By: Chris Raible <chris@ghost.org>
no ref This helps fix a hypothetical bug in the topological sorter. If you supply a dependency that doesn't exist, this will now error instead of silently passing. Noticed this while looking at `topologicalSort`. `reset:data` still works after this change.
towards https://linear.app/ghost/issue/NY-1523 In [an upcoming change][0], we'll be trying to find the newest automation run per automation. This adds an index to make that query faster. **I was lazy and did not test the performance of this migration.** [0]: https://linear.app/ghost/issue/NY-1523
Co-authored-by: tryghost-renovate[bot] <269725441+tryghost-renovate[bot]@users.noreply.github.com>
closes https://linear.app/ghost/issue/NY-1522 This change should have no user impact. It adds various automations records, like `automations` and `automation_actions`, to our data generator. The code was primarily vibe-coded and isn't great, but it worked in our testing. Co-Authored-By: Chris Raible <chris@ghost.org>
closes https://linear.app/ghost/issue/NY-1523 *I recommend reviewing this one commit at a time.* This adds `stats.last_run_created_at` to each automation, which we'll display in the UI soon. In addition to unit and E2E tests, I also verified that the data appeared by checking the Network tab of the Firefox devtools: 
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )