discourse/plugins/discourse-github/spec/jobs
Régis Hanol 67985bff52
PERF: optimize GitHub PR onebox rebaking (#36739)
Previously, when rebaking posts containing GitHub PR oneboxes, we passed
`invalidate_oneboxes: true` to `rebake!` which would re-fetch the onebox
during cooking. This meant each post independently fetched the same PR
data from GitHub.

Now we:

1. Fetch and cache the onebox once upfront via `Oneboxer.preview`
2. Use the new `skip_publish_rebaked_changes` parameter to prevent
publishing intermediate states, without triggering onebox re-fetches
3. Filter posts by `cooked LIKE '%githubpullrequest%'` in SQL rather
than fetching all linked posts and filtering in Ruby

The new `skip_publish_rebaked_changes` parameter on `Post#rebake!`
allows callers to skip the `:rebaked` publish without triggering onebox
invalidation, which is useful when the caller has already refreshed the
cache separately.
2025-12-17 12:06:16 +01:00
..
create_github_linkback_spec.rb
rebake_github_pr_posts_spec.rb PERF: optimize GitHub PR onebox rebaking (#36739) 2025-12-17 12:06:16 +01:00
replace_github_non_permalinks_spec.rb DEV: Fix random typos (#33839) 2025-07-24 22:04:13 +02:00