Do you know the best way to suggest changes on a Pull Request?
Updated by Brady Stroud [SSW] 10 months ago. See history
Normally, the best way to provide feedback on content changes is to use the change X to Y format. When it comes to reviewing Pull Requests (PRs) in GitHub, this is not the case - it's inefficient for the PR owner. They have to manually interpret each suggested change, implement them in the code, and then commit the changes, which can be time-consuming.

❌ Figure: Bad example - GitHub - Using change X to Y format (need to copy+paste changes)
Instead, reviewers should use GitHub's Add a suggestion feature. This allows the reviewer to directly suggest changes in the code diff view, and the PR creator can easily accept or reject these changes with a single click. This process is more streamlined and makes it easier to implement suggestions.

✅ Figure: Good example - GitHub - Using the 'Add a suggestion' button
When the PR creator reviews the suggestion, they can either click 'Commit suggestion' to apply it directly or 'Resolve conversation' if they choose not to apply it.

✅ Figure: Good example - GitHub - Easy to see what has changed + awesome 'Commit Suggestion' button ✨
If an author has made multiple suggestions to your code it may be best to add the suggestions in a batch and then. This allows you to create a single useful commit message that summarizes the changes in the feedback.

✅ Figure: Good exmample - Applying code suggestions in a batch