Escape auto-linked GitHub usernames more precisely
More precisely match how GitHub auto-links usernames when escaping usernames to suppress pings.
Perhaps most noticeably, this now keeps punctuation outside of the escaped username.
You can verify that this matches GitHub's behavior by copying the test string (with strings concatenated and \ns resolved, of course) into a Markdown editor on GitHub and comparing what is auto-linked when rendered.
Improves upon https://github.com/rust-lang/homu/pull/100.
CI has really picky code style 😅
This needs handling of teams. Since I'm not in @rust-lang, I had overlooked that, since my UI doesn't render @rust-lang/libs as a link. I'll be implementing that.
Just noting that performing non-trivial changes to homu might be a bit futile at the moment. We're in the processing of reimplementing the bot in Rust (https://github.com/rust-lang/bors).
Created an issue for this: https://github.com/rust-lang/bors/issues/258.
This is now obsolete, due to https://github.blog/changelog/2025-11-07-removing-notifications-for-mentions-in-commit-messages/ ! 🎉
Should our escaping be removed entirely now?
Yeah, it might be! https://github.com/rust-lang/bors/issues/455