Skip to content

[pull] main from TryGhost:main#1221

Merged
pull[bot] merged 11 commits into
code:mainfrom
TryGhost:main
Jun 8, 2026
Merged

[pull] main from TryGhost:main#1221
pull[bot] merged 11 commits into
code:mainfrom
TryGhost:main

Conversation

@pull

@pull pull Bot commented Jun 8, 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 : )

troyciesco and others added 11 commits June 8, 2026 12:49
closes https://linear.app/ghost/issue/NY-1316
- `day_diff(date_from, date_to)` ran whenever `date_from` was defined,
so a request with `date_from` but no `date_to` threw a 400 error. These
errors don't come from the Ghost frontend - we always send `date_to` to
this endpoint - but requests directly to this endpoint were hitting the
error
- every other stats endpoint (via `filtered_sessions`) already defaults
a missing `date_to` to today; api_kpis intended to as well but the
day_diff guard broke that
- added `defined(date_to)` to the `day_diff` checks so a missing
`date_to` falls through to the existing `today()` default instead of
erroring
towards https://linear.app/ghost/issue/NY-1321

*This change should have no user impact.*

Before this change, we fetched an array of settings but only grabbed the
first. After this change, we just fetch the setting we need.

I think this is useful on its own, but also makes [an upcoming
change][0] easier.

[0]: https://linear.app/ghost/issue/NY-1321
The User model didn't declare `filterRelations` for the roles relation, so NQL emitted `roles.name:[...]` filters as a WHERE clause with no JOIN to `roles_users` or `roles`. MySQL and SQLite both rejected the query. In createCustomNotification's alert branch, the worker runs with `rethrowErrors: true`, so the SQL error escaped the wrapping try/catch and exited the function before notifications.add was called. The alert email and the in-app banner were both silently dropped.

Declared the missing filterRelations on the User model. The update-check service uses the natural NQL filter directly.

Added an integration test that drives the full path through a real worker spawn and model layer, asserting the notification is persisted in settings.notifications. Rewrote the unit test to assert outcomes (recipient, subject, content, persisted shape) instead of pinning the exact call signature to api.users.browse.
ref #24536

Removes `ghost/admin/mirage/fixtures/timezones.js`, which is dead code.
closes https://linear.app/ghost/issue/NY-1286
ref #28239
ref #28263
ref #28343
ref #28375
ref #28376

This change starts executing automations (only in development and test).
no ref

In Portal, clicking on "Powered by Ghost" could open up two browser tabs due to it being an anchor tag with a redundant `onClick` handler doing the same.
run-update-check.js initialised permissions, settings, and tiers in the worker thread but never called emailAddress.init(). Worker threads have their own require cache, so the main process's init in boot.js doesn't propagate. When the alert branch reached ghostMailer.send → getFromAddress, accessing emailAddress.service.defaultFromEmail threw because service was undefined. The error escaped the alert try/catch via rethrowErrors: true and exited the function before notifications.add was called, dropping both the banner and the email.

Added emailAddress.init() to the worker's init sequence.

Strengthened the integration test to activate the Owner fixture so users.browse returns a recipient and the worker exercises notificationEmailService.send end-to-end. Routed the worker's mailer to nodemailer-stub-transport via process.env so it doesn't try to connect to localhost SMTP. The previous test shape silently dropped to the to.length === 0 early-return and missed the regression.
…nt tab (#24626)

no ref

Clicking "Contact support" in Portal triggers two navigation attempts:
one from the `href` attribute (which navigates in the current tab) and
one from the `onClick` handler (new tab). The new tab opens correctly,
but the current-tab attempt fails in the iframe context, resulting in an
error.
…18188)

no issue

Updated Ghost's error messages when creating a user password (in Admin) to clarify the 'rules' rather than guesswork. These aren't necessary to keep vague as they don't allow for enumeration, such as entering in usernames.
no ref

This test-only change should have no user impact. Koenig's test utilites
now use TypeScript.
@pull pull Bot locked and limited conversation to collaborators Jun 8, 2026
@pull pull Bot added the ⤵️ pull label Jun 8, 2026
@pull pull Bot merged commit 798d373 into code:main Jun 8, 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.

6 participants