mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-02 06:48:58 +08:00
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. |
||
|---|---|---|
| .. | ||
| create_github_linkback_spec.rb | ||
| rebake_github_pr_posts_spec.rb | ||
| replace_github_non_permalinks_spec.rb | ||