Developers : 7-Add Suggestions During a GitHub Pull Request Review - SkillBakery Studios

Breaking

Post Top Ad

Post Top Ad

Sunday, July 19, 2026

Developers : 7-Add Suggestions During a GitHub Pull Request Review

Developers : 7-Add Suggestions During a GitHub Pull Request Review

Screenshot from the tutorial
Screenshot from the tutorial

Enhancing GitHub Pull Request Reviews: Adding Suggestions

Pull requests (PRs) are a vital part of the collaborative development process on GitHub. They allow developers to propose changes to a project and invite others to review and discuss those changes. One of the most powerful features of GitHub's PR review process is the ability to add suggestions directly within the review. In this post, we'll explore how to effectively add suggestions during a GitHub pull request review, ensuring that feedback is constructive, clear, and actionable.

Understanding the Importance of Suggestions

When reviewing code, providing suggestions instead of just comments can significantly improve the quality of feedback. Suggestions help guide the author toward best practices, resolve potential issues, and enhance the overall code quality. Additionally, they can speed up the review process by offering a clear path to implementing the recommended changes.

How to Add Suggestions During a Review

Let’s go through the steps to add suggestions during a GitHub pull request review:

Step 1: Open the Pull Request

To begin, navigate to the specific pull request you want to review. You can find this under the "Pull requests" tab of the repository.

Step 2: Review the Code Changes

Once you’re in the PR, click on the "Files changed" tab to see the modifications made by the contributor. Take your time to understand the changes, looking out for code quality, functionality, and adherence to coding standards.

Step 3: Start the Review Process

Click on the "Review changes" button located at the top right of the files changed view. You will be prompted to provide feedback, and here is where you can really make your suggestions count.

Step 4: Add Suggestions

  1. Line Comments: Hover over the line of code you want to comment on. A blue plus icon will appear on the left side. Click it to open the comment box.

  2. Suggest Changes: Within the comment box, type your suggestion. To format your suggestion as a code block, use triple backticks (```) before and after the code. This helps in highlighting the code clearly.

    For example:

    // Original code
    const total = items.reduce((sum, item) => sum + item.price, 0);
    
    // Suggested change
    const total = items.reduce((sum, item) => sum + item.price, 0).toFixed(2);
    
  3. Use the Suggestion Feature: Instead of just explaining what to change, you can use the "Suggest changes" feature. After making your comment, click on the checkbox that appears to indicate it is a suggestion. This will allow the contributor to apply your changes directly.

Step 5: Summarize Your Review

Once you’ve added your suggestions, provide an overall summary of your review. This can include your thoughts on the changes, areas of concern, and a general recommendation (approve, request changes, or comment).

Step 6: Submit Your Review

Finally, click the "Submit review" button to send your feedback. The contributor will receive your suggestions and can address them accordingly.

Best Practices for Adding Suggestions

  • Be Constructive: Frame your suggestions in a positive light. Use phrases like “Consider using…” or “It might be better to…”.
  • Be Clear: Ensure that your suggestions are easy to understand. Avoid jargon unless it’s common knowledge in the context of the project.
  • Be Respectful: Remember that the author may have put significant effort into the changes. Approach the review with empathy and professionalism.

Conclusion

Adding suggestions during a GitHub pull request review is an essential skill for any developer. By providing actionable feedback, you not only help improve the code but also foster a collaborative and supportive development environment. By following the steps and best practices outlined in this tutorial, you can enhance the effectiveness of your code reviews and contribute positively to your projects.

For more insights into GitHub features and collaborative coding practices, be sure to follow our blog!

Another screenshot from the tutorial
Another view from the tutorial

Connect with SkillBakery Studios

Explore more tutorials, tools, and resources:

Posted by SkillBakery Studios

No comments:

Post a Comment

Post Top Ad