homu icon indicating copy to clipboard operation
homu copied to clipboard

Automate the r=me idiom

Open Centril opened this issue 6 years ago • 6 comments

Oftentimes reviewers will write something like r=me with green travis. It would be good to automate this sort of thing such that a reviewer can write:

@bors r=me

and then bors will r+ once travis is actually green. That way, you don't need any other reviewer to intervene or to delegate bors privileges.

Centril avatar May 28 '19 20:05 Centril

r=me is explicitly blacklisted because it could also mean r=me after you have fixed this and that. I do not want to change that.

We could add a different opt-in command for like @bors r+ when-green (which could also allow @bors r=someone-else when-green).

We could add a forced pre-check after r+ before testing the PR:

  • if the status+check is all green, homu will test it
  • if the status+check has at least one red, homu will r- the PR (like a merge conflict)
  • if the status+check has at least one yellow, homu will skip for the next PR; if the queue is exhausted homu will check again in 5 minutes (or after a GitHub event is received or other retry mechanism; whichever easier).

The reviewer can opt-out the Travis PR check by @bors trust-me-it-really-works.

One difficulty with automatic r+ is that a CI vendor may spuriously unable to update the GitHub status, keeping the PR forever in yellow.

Also, it's hard to verify the correctness without a test framework 🤷‍♀️

kennytm avatar May 28 '19 21:05 kennytm

We could add a different opt-in command for like @bors r+ when-green (which could also allow @bors r=someone-else when-green).

Sure, that sounds good. The actual command isn't that important to me.

We could add a forced pre-check after r+ before testing the PR:

Maybe... that seems like a more invasive change that might be annoying when doing rollup ops or when accepting obviously passing PRs. I think when-green is good enough for now. :)

Centril avatar May 28 '19 21:05 Centril

We talked about this again recently. @tmandry suggested @bors r+ await, which I think would be a good name for this.

camelid avatar Oct 30 '20 18:10 camelid

There's a possibility that fixing CI leads to "oh this requires a lot more changes". So a final explicit approval should always be required IMO. r=me works well as "I trust you to approve given that additional changes are minor".

camsteffen avatar Jan 11 '22 15:01 camsteffen

My idea of how this feature (@bors r+ await) would work is it would only approve the PR if CI passed. If CI failed, it would cancel the approval and the PR would have to be approved manually.

camelid avatar Jan 11 '22 19:01 camelid

That makes more sense. Or it could be default behavior and opt-out with @bors r+ now.

camsteffen avatar Jan 11 '22 19:01 camsteffen