homu icon indicating copy to clipboard operation
homu copied to clipboard

Escape auto-linked GitHub usernames more precisely

Open thaliaarchi opened this issue 10 months ago • 3 comments

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.

thaliaarchi avatar Mar 07 '25 03:03 thaliaarchi

CI has really picky code style 😅

thaliaarchi avatar Mar 07 '25 04:03 thaliaarchi

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.

thaliaarchi avatar Mar 07 '25 23:03 thaliaarchi

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.

Kobzol avatar Mar 27 '25 09:03 Kobzol

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?

thaliaarchi avatar Nov 09 '25 18:11 thaliaarchi

Yeah, it might be! https://github.com/rust-lang/bors/issues/455

Kobzol avatar Nov 09 '25 19:11 Kobzol