Should I Make Small Changes in a PR Review or Let the Author Handle It?

0
33
Asked By CuriousCoder42 On

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

Answered By DevGuru99 On

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.

Answered By CreativeCoder33 On

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.

Answered By TechWhiz84 On

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.

Answered By DebuggingQueen On

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!

Answered By CodeNinja72 On

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

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.