rust-lang / triagebot

Automation/tooling for Rust spaces
https://triage.rust-lang.org
Apache License 2.0
169 stars 75 forks source link

Quote review suggestions in comments #1783

Closed apiraino closed 3 months ago

apiraino commented 3 months ago

This looks like an innocent cosmetic change now but it become critical when we will implement the new review assignment.

In case a pull request review cannot be assigned (for any reason), the triagebot will post a comment on GitHub. The text of the comment does not quote correctly the "r?" wording, example "Use r? to specify someone else to assign.".

That could trigger an infinite loop where the words "r? to" are interpreted by the triagebot receiving the webhook after posting that command.

Quoting with markdown will prevent this loop.

I am not sure this patch solves 100% of the all cases but it should cover most of them.

r? @jackh726

rustbot commented 3 months ago

Error: Parsing assign command in comment failed: ...' example "' | error: specify user to assign to at >| 'Use r? to '...

Parsing assign command in comment failed: ...' to' | error: specify user to assign to at >| '" are inte'...

Please file an issue on GitHub at triagebot if there's a problem with this bot, or reach out on #t-infra on Zulip.

rustbot commented 3 months ago

Error: Parsing assign command in comment failed: ...' example "' | error: specify user to assign to at >| 'Use r? to '...

Parsing assign command in comment failed: ...' to' | error: specify user to assign to at >| '" are inte'...

Please file an issue on GitHub at triagebot if there's a problem with this bot, or reach out on #t-infra on Zulip.

Mark-Simulacrum commented 3 months ago

We should already be ignoring any messages from triagebot for command parsing, but extra quoting shouldn't hurt.