bors icon indicating copy to clipboard operation
bors copied to clipboard

Check that reviewers actually exist

Open Kobzol opened this issue 11 months ago • 6 comments

When someone does @bors r=abc, the bot should check if abc is a valid (GitHub) username (or a GH team?). To avoid situations where the name of the reviewer is mispelled, which happens quite often, and is problematic for https://thanks.rust-lang.org/.

It is common to specify names separated by commas, so bors should understand that and check all usernames separately.

We might also include some kind of opt-out, where you really want to use r= for a non-existent GH account.

Kobzol avatar Jan 01 '25 10:01 Kobzol

We might also include some kind of opt-out, where you really want to use r= for a non-existent GH account.

what are the use cases for this? Imo we should document them 👍

Also, should we mark this as good-first-issue?

marcoieni avatar Jan 16 '25 07:01 marcoieni

Yeah, this shouldn't be hard, marked it as such :)

The use-case is mostly using r=, where the team might or might not be an actual GitHub team, and reviewers might not be willing to lookup the actual name of the team :D But marking a team as a reviewer is quite rare, tbh, so I think it would be fine if we just error out on an invalid name, and perhaps print a list of names that have a close Levenshtein distance (or something like that) to the used name.

Kobzol avatar Jan 16 '25 08:01 Kobzol

Ok, so it seems we could have two PRs to solve this issue:

  1. The first one, just checks for invalid @bors r=abc
  2. The second one, prints a list of names that have a close distance

marcoieni avatar Jan 16 '25 09:01 marcoieni

Error: This repository is not enabled to use triagebot. Add a triagebot.toml in the root of the default branch to enable it.

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 avatar Jan 28 '25 06:01 rustbot

if anyone is not working on it can i work on it ? cc @Kobzol

Gmin2 avatar Feb 02 '25 11:02 Gmin2

Sure :)

Kobzol avatar Feb 02 '25 11:02 Kobzol