rust-lang / triagebot

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

Support highfive functionality #1656

Closed ehuss closed 1 year ago

ehuss commented 1 year ago

This adds the functionality from highfive into triagebot. The motivation is to hopefully have something more maintainable, and to reduce the overhead of managing another service.

Overview of what this does:

See https://hackmd.io/@ehuss/rJ_MLj-Ji for the original proposal which includes some discussion of alternatives considered.

Migration

To migrate a repo, the process is roughly:

  1. Post a PR to add triagebot.toml configuration.
  2. Post a PR to remove the configuration from highfive.
  3. Very shortly after the triagebot.toml file is merged, merge the highfive change (or just remove the highfive webhook from the repo) to avoid conflicting behavior.

Differences

For various reasons, there are several differences in this implementation versus highfive:

ehuss commented 1 year ago

Thanks for the review!

It would be great to get the documentation you've written for the PR description somewhere in the repo itself.

I plan to update the wiki documentation after this merges. Here is a draft of what I plan to post: https://gist.github.com/ehuss/5745d8b8d979a68c167f3b700fbb4be5

I'm concerned that moving the configuration from the highfive repo to rust-lang/rust will make changes more painful. Is the team repo another possible place?

This was addressed in the original proposal at https://hackmd.io/@ehuss/rJ_MLj-Ji. Overall I think it will be easier to configure it in one place (triagebot.toml) instead of multiple places. Or, placing codeowners in the teams repo also seems like the wrong way to approach it (since the file layout could change over time). I also think it will be easier for different repos to be able to update and adjust these on their own instead of relying on someone to merge something in the teams repo which can take a long time. Dealing with the ad-hoc groups would also be complicated.

I understand this makes some things a little more complicated, such as removing a user from a team. However, I don't expect that to be too much of a problem (and I'll update the forge docs as well).

I'm unsure if it's wise to allow r? to anyone. I suppose we can see if this ever becomes a problem in practice, but it's relatively simple to prevent I wonder, why not?

This was also addressed in the proposal document. The original logic was somewhat awkward (using "collaborators" which on rust-lang/rust is a odd assortment of people). I'm not too worried about abuse, and it is easy to undo any abuse that occurs. It can also be added later if it seems necessary.

I think the comment editing "bug" is indeed a bug and should be fixed. Comment editing is very common (especially for checking boxes), so I imagine this will get encountered fairly often.

OK. I changed it to ignore edits. It is a somewhat tricky issue, because I have observed users trying to edit their r? comments, particularly when they don't work. highfive would ignore something like r? rust-lang/foobar and then the user would try to edit it to try to fix it, and get frustrated when nothing happens. It could in theory respond to edits on the last comment (or the last comment with an r?), but that seems like it is more complicated than it is worth.

I think r? on closed PRs should be ignored.

OK, I added a check for that. I don't like to ignore commands, as it can be confusing when a bot does not respond, so I had it post a comment.

Mark-Simulacrum commented 1 year ago

Modulo the two implementation comments I'm personally very excited to see this land, thanks for putting it together.