Skip to content

[pull] main from TryGhost:main - #1422

Merged
pull[bot] merged 19 commits into
code:mainfrom
TryGhost:main
Aug 17, 2026
Merged

pull[bot] merged 19 commits into
code:mainfrom
TryGhost:main

Conversation

@pull

@pull pull Bot commented Aug 17, 2026 •

Copy link
Copy Markdown

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 : )

EvanHahn and others added 19 commits August 17, 2026 13:02
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:

![devtools screenshot](https://github.com/user-attachments/assets/61db3645-ef0d-48f5-be8c-5336af2021dc)
@pull pull Bot locked and limited conversation to collaborators Aug 17, 2026
@pull pull Bot added the ⤵️ pull label Aug 17, 2026
@pull
pull Bot merged commit ce08414 into code:main Aug 17, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants