-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A guide to reviewing PRs for merge #72374
Conversation
It would be good if a link to this document were automatically included in our PR process somewhere visible - A guide is useless if nobody reads it. |
If you'll forgive the double post, the line count is easy enough to automate - I would suggest we have a bot count up the number of lines in a PR, and if they exceed the threshold, pop a link to this document in there with a note that this is a PR that needs more careful review. |
I agree that it should be linked somewhere, but the PR blurb itself is already too long and mostly unread. The idea of having a bot that can detect certain common spots it's needed is a good start. A discord shortcut like we have for -fms is also a good idea. |
I'm not talking about the PR blurb. I'm talking about automatically leaving a comment on the PR a la our spell checker. And after thinking over our discord conversation, if you want to require more careful review by senior developers for "sufficiently large" PRs before they are merged, I wouldn't be against that. |
I think we might be able to do it by checking (1) size (ideally distinguishing c++ from json) and (2) number of labels. The more labels a PR has the more likely it is to require review, particularly now that we have an automatic labelling system. |
I for one, as a newbie, did not know "reviewing" was a thing that anyone could do and thought it was for maintainers/senior devs/bots. So this is nice. Although a link from somewhere relevant would definitely be helpful. There are still docs that I haven't explored or read in the docs directory, two years later lol. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wholeheartedly approve of increased transparency and think this is a good step forward.
I have only contributed a couple of lines of JSON, but I read PRs to keep up with experimental changes. More relevant is the fact that I work as a software engineer that has to conform to Company Best Practices for development cycles.
Clear communication and clear expectations are a good thing. I would also wish for clearer guidelines on what feedback should be given when PRs are rejected or reverted. Good communication is key to collaborations, and no well-meaning feedback is ever as bad as the imagined feedback when all one gets is silence.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I read the thing.
That one can be very tricky but it's something we're looking at. |
Co-authored-by: Brambor <tondadrd@seznam.cz>
Co-authored-by: Brambor <tondadrd@seznam.cz>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be honest: It feels like a rambly blog post right now and should be much more concise. Guidelines or rules are hard to read in that format.
I also strongly suggest to use more affirmative language. Specific example: this does NOT mean you should immediately close your large PR
- replace it with e.g you may carry on with your PR - however, consider splitting it into parts
.
You use "not" and "NOT" a lot in this document where it can be reworded to produce results that are intuitively easier to understand.
If you want to read up on the specifics, see e.g https://blog.wordvice.com/grammar-avoid-double-negatives/ or https://en.wikipedia.org/wiki/Reactance_(psychology). This is partly the classic problem of when you put up a sign onto a fragile object that says "Do not touch", which immediately tempts people to touch it because our brains are dumb (could also be related to call of the void?). Putting "Touching will damage the object" instead is much more effective.
Wording this review right now causes https://xkcd.com/1915/ in me. So I'll just finish for now and submit this review.
Co-authored-by: NetSysFire <59517351+NetSysFire@users.noreply.github.com>
Thanks for the proofreading. I agree it's a bit verbose, I just tend to be that way; fixing it requires cognitive load that I probably should safe for other things. I'm open to someone making a more detailed editing pass in a follow up PR but I'm out of steam to do it myself on this one. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just went through this and changed some instances calling the guidelines rules for consistency.
adjusted wording slightly from knut-aage-hofseth's version in a few of them. Co-authored-by: Knut-Aage-Hofseth <15341115+Knut-Aage-Hofseth@users.noreply.github.com>
Summary
Infrastructure "A guide to reviewing PRs for smoother and more consistent merging"
Purpose of change
Per the doc itself:
Describe the solution
Describe alternatives you've considered
This isn't strictly necessary. The most important step to preventing the reversions we've seen lately is simply to make sure our people with merge permissions have been more thoroughly trained by the senior devs. However, this has happened twice now, and once was too much. This is another good stage to try to standardize things.
I also really hope that this will help encourage people to be more proactive about reviewing PRs, as that's one of the best overall ways to get the project running more smoothly and to encourage merging.
Testing
n/a
Additional context
This is a living document, feedback on wording and content is welcome.