I'm curious about the correct approach when reviewing a pull request (PR). If there's a minor adjustment needed, like moving a block of code to where it belongs, should I go ahead and make those changes myself since I can do it quickly, or is it better to reject the PR and ask the author to make the edits? I want to make sure I'm handling this appropriately. What do you think?
5 Answers
The best practice is to add a comment suggesting the change rather than making the edit yourself. This way, the original author can choose to accept or reject your suggestion. It promotes communication and allows them to learn from it, which is more beneficial for everyone in the long run.
In GitHub, you can suggest changes directly. It gives the PR author the power to either accept it right away or tweak it to their liking. This way, you contribute while still respecting their ownership.
I think of it this way: if you were editing a document, would you want someone changing your wording without asking? Probably not. Unless there's an urgent need, it's always better to leave it to the author.
I can't stress this enough: don’t directly change someone else’s code during reviews! It shows a lack of trust in their abilities. Instead, suggest the change and let them decide how to implement it. Collaboration is key!
Totally agree with the idea of commenting. It's about shared knowledge and maintaining code quality. Just making the changes without discussing can come off as trusting or disrespectful, especially in a collaborative environment.

Related Questions
How To: Running Codex CLI on Windows with Azure OpenAI
Set Wordpress Featured Image Using Javascript
How To Fix PHP Random Being The Same
Why no WebP Support with Wordpress
Replace Wordpress Cron With Linux Cron
Customize Yoast Canonical URL Programmatically