mirror of
https://github.com/discourse/discourse.git
synced 2026-08-03 09:53:24 -05:00
FIX: Skip rebaking posts with inline GitHub PR oneboxes (#36576)
Posts and chat messages with inline oneboxes to GitHub PRs were being
unnecessarily rebaked when the PR status changed. This happened because
the check `cooked.include?("onebox")` matched both full oneboxes
(`class="onebox githubpullrequest"`) and inline oneboxes
(`class="inline-onebox"`).
Changed the check to match "githubpullrequest" specifically, which only
appears in full PR oneboxes that actually display the status.
Internal ref - t/169442
This commit is contained in:
@@ -46,7 +46,7 @@ module Jobs
|
||||
|
||||
def has_github_pr_onebox?(cooked, pr_url)
|
||||
# quick & dirty check to avoid doing unnecessary rebakes
|
||||
cooked.present? && cooked.include?("onebox") && cooked.include?(pr_url)
|
||||
cooked.present? && cooked.include?("githubpullrequest") && cooked.include?(pr_url)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user