0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-05 23:04:22 +08:00
discourse/plugins/discourse-github/app
Renato Atilio 37134e5659
FIX: Refresh GitHub PR onebox status for URL variants (#41878)
The PR status webhook only knows the canonical PR URL, but posts can
link the PR in forms the onebox engine also accepts: with a path suffix
(/changes, /files), query, fragment, http scheme, or www host. Oneboxes
are cached per exact URL (and full oneboxes under the normalized
encoding), so invalidating only the canonical URL left every other
variant stale. The rebake then re-cooked the old status straight from
cache and the icon never updated.

Match links with an anchored, scheme/host-tolerant pattern and
invalidate the exact URLs stored in TopicLink/Chat::MessageLink (plus
their normalized encodings), so whichever variant a post used gets a
fresh fetch on rebake. The anchoring also stops a webhook for `/pull/12`
from rebaking posts for `/pull/123`, which the old prefix match did.
2026-07-21 20:03:12 -03:00
..
controllers/discourse_github
jobs FIX: Refresh GitHub PR onebox status for URL variants (#41878) 2026-07-21 20:03:12 -03:00
lib UX: Name the failing repository in GitHub setting validation errors (#41738) 2026-07-15 15:46:18 +02:00
models