- Published on
How to Write Clear PR Feedback
- Authors
- Name
- Gabriel
- @gabriel__xyz
How to Write Clear PR Feedback
Clear PR feedback improves code quality, speeds up development, and fosters better collaboration. The key is to provide actionable, respectful, and specific comments that help developers understand not just what to change but why. Here's how to do it effectively:
- Start with positives: Highlight what works well to set a constructive tone.
- Be specific: Reference exact lines of code and explain the reasoning behind suggestions.
- Separate priorities: Clearly distinguish between required changes and optional improvements.
- Use empathy: Frame feedback as collaborative suggestions, not commands.
- Encourage learning: Ask open-ended questions and share resources for growth.
Tools like PullNotifier simplify feedback delivery by sending real-time, targeted notifications to Slack, ensuring the right people see updates promptly. This reduces delays and keeps reviews efficient.
How To Review Someone's Code While Not Being A Jerk! by Maha Alsayasneh
::: @iframe https://www.youtube.com/embed/tDMKX3Zuo3Q :::
Core Principles of Helpful PR Feedback
Giving thoughtful PR feedback isn't just about spotting issues in the code. The way you deliver feedback can either uplift your teammates or discourage them. When approached with care and a focus on collaboration, code reviews can become a cornerstone for team growth and shared learning.
Focus on Improvement, Not Criticism
The way you phrase your feedback matters. Instead of simply pointing out flaws, aim to highlight areas for improvement and suggest ways to address them. This approach turns what could feel like criticism into a constructive conversation.
For example, unhelpful feedback might sound accusatory: "This is wrong" or "Why did you do it this way?" Comments like these often put the recipient on the defensive without offering a clear path forward. On the other hand, helpful feedback might say: "Consider refactoring this function to improve readability" or "This works, but extracting this logic into a separate method could make testing easier."
The purpose of feedback is to help your teammate write better code - not to showcase your own knowledge. By framing your comments around improvement, you foster an environment where developers feel safe to experiment, ask questions, and grow. This mindset not only helps maintain code quality but also encourages innovation and collaboration.
It’s important to remember that everyone, regardless of experience level, is continually learning. Even seasoned developers can miss something or take a less-than-ideal approach. By focusing on solutions rather than pointing out problems, you contribute to a culture where everyone feels valued and motivated to do their best work.
Use Empathy and Positive Language
Once you’ve identified areas for improvement, it’s just as important to deliver your feedback in a way that respects your teammate. Empathy goes a long way in making your comments actionable and well-received. Consider the context in which the code was written - tight deadlines, unfamiliar codebases, or particularly tricky requirements can all influence decisions.
Empathetic feedback recognizes the effort behind the work. Instead of issuing commands like "Do this", try using collaborative language: "I suggest" or "You might improve X by doing Y." This subtle shift in tone makes your feedback feel more like teamwork and less like criticism. It shows that you respect your colleague’s perspective while still offering clear and constructive guidance.
Encourage Learning and Ownership
Respectful communication lays the groundwork for encouraging personal accountability and growth. The best feedback doesn’t just tell someone what to do - it helps them think critically and take ownership of their work. This balance between providing direction and allowing autonomy fosters both professional development and a stronger sense of responsibility.
Rather than dictating solutions, ask open-ended questions that inspire reflection. For instance: "What do you think about using this approach?" or "How do you think this will scale with larger datasets?" Questions like these encourage developers to explore different perspectives and arrive at their own conclusions.
When suggesting a new pattern or approach, it’s also helpful to offer resources that can deepen understanding. For example: "For consistency, could you use our standard commit message format? Here’s a link to our guidelines." Providing tools and documentation empowers your teammates to learn independently and apply that knowledge in the future.
Encouraging ownership also means trusting your teammates to implement changes in their own way, as long as they meet the project’s goals. Giving them the freedom to make decisions fosters a deeper investment in their work and encourages critical thinking for future contributions.
Lastly, don’t forget to celebrate wins. When you see well-structured code or a creative solution, call it out. Acknowledging good decisions reinforces positive behaviors and motivates developers to continue honing their skills. Recognition is a simple but powerful way to build confidence and strengthen team morale.
Steps for Writing Clear PR Feedback
Effective feedback in code reviews hinges on clear communication and a considerate tone. By following these practical steps, you can provide feedback that not only improves the code but also fosters a collaborative and productive environment.
Start with Positive Observations
Kicking off your review with positive remarks sets a constructive tone and shows that you’ve taken the time to notice what’s working well. This approach makes developers feel appreciated and reinforces good practices they should continue.
When you see well-written code, creative solutions, or improvements from earlier work, call them out specifically. Avoid generic comments like "looks good." Instead, highlight specific examples: "The error handling in the authentication module is thorough - I like how you’ve accounted for edge cases like expired tokens and network timeouts."
Positive feedback also helps soften the impact of any critical comments that follow. When developers know their strengths are recognized, they’re more receptive to suggestions for improvement. This balance creates a review environment where people feel encouraged to learn and take risks.
Acknowledging good practices benefits the whole team. When you highlight a smart approach in a pull request, other developers reading the review can learn from it. Over time, this informal sharing of knowledge helps align the team on coding standards without requiring extra meetings or documentation.
Once you’ve acknowledged strengths, shift your focus to specific areas for improvement.
Be Specific and Provide Context
Vague feedback can frustrate developers and slow down the review process. Comments like "this could be better" or "consider refactoring" don’t give enough direction. Instead, pinpoint the issue, explain its impact, and suggest actionable solutions.
Reference specific lines of code when raising concerns. For example, rather than saying, "the database queries are inefficient", you could write: "The user lookup on line 47 runs inside the loop, causing N+1 queries. Consider moving this outside the loop or using a batch query to fetch all users at once."
Providing context helps developers understand why a change matters. For instance, you might explain: "This validation logic should also run on the server. Without server-side validation, malicious users could bypass these checks and submit invalid data directly to our API."
When suggesting alternatives, add some background. If you recommend a specific library or approach, briefly explain why: "We use Joi for input validation in other services. Using it here would align with our existing codebase and provide access to more robust validation rules."
Separate Required Changes from Suggestions
Not all feedback carries the same weight, and it’s important for developers to know which changes are critical versus which are optional improvements. Clearly categorize your feedback to make this distinction.
Label your comments as either ‘Mandatory’ or ‘Suggestion.’ For required changes, use phrasing like "This must be addressed before merging" or "Please fix this issue." For optional suggestions, you can say "Consider trying this" or "This might be a nice improvement."
Mandatory changes typically involve serious issues like security vulnerabilities, bugs that could cause failures, or violations of coding standards. These must be resolved before merging the pull request.
Suggestions focus on areas like code organization, minor performance tweaks, or cleaner alternatives. While these enhance the code, they aren’t critical to the pull request’s success and can be skipped if time is tight.
Optional feedback might include long-term ideas for refactoring, questions about design decisions, or observations about patterns that could be improved later. These comments serve as food for thought without pressuring the developer to act immediately.
To make priorities even clearer, some teams use tags or prefixes like "[BLOCKING]", "[SUGGESTION]", or "[OPTIONAL]" in their comments. Whatever system you choose, consistency across the team ensures a smoother and more predictable review process.
sbb-itb-bb724ad
PullNotifier to Improve Feedback Delivery
UsingEven the clearest feedback loses its impact if it doesn’t reach the right people at the right time. Delayed notifications can turn small issues into big roadblocks. PullNotifier solves this problem by streamlining how teams receive and respond to pull request (PR) updates, ensuring feedback flows smoothly.
Its real-time notification system ensures that updates land exactly when and where they’re needed.
Real-Time Notifications for Faster Feedback
The speed at which feedback is delivered directly impacts a team's workflow. If reviewers aren’t aware that a pull request is ready or developers miss responses to their code, the entire process slows down. PullNotifier solves this by delivering real-time updates about PR activity directly in Slack, keeping everyone informed and ready to act [1][2][3].
Unlike traditional email notifications, which can easily go unread for hours, Slack notifications appear instantly in a space where developers are already collaborating. This immediacy accelerates feedback cycles, helping pull requests move through reviews without unnecessary delays. During busy times, when multiple pull requests are in play, these real-time updates make it easier for reviewers to prioritize and ensure no PR gets overlooked.
Customizing Notifications to Stay Focused
Too many notifications can overwhelm teams, making it hard to spot the important ones. PullNotifier addresses this by updating existing Slack messages with the latest pull request status, instead of sending a new message for every change [1][2][3].
For example, when a pull request progresses from "ready for review" to "changes requested" or "approved", the same Slack message is updated to reflect the current status. This keeps channels tidy and makes it simple to check the latest PR state at a glance.
Teams can also tailor notifications to their needs. Some prefer alerts for every comment and status update, while others only want to know about major milestones like approvals or merge conflicts. PullNotifier allows teams to fine-tune which events trigger notifications, reducing unnecessary noise and ensuring updates remain relevant [1].
For more complex setups, like monorepos, the tool offers advanced notification rules. Pull request updates can be routed to specific Slack channels based on PR labels, authors, or reviewers. This ensures that, for example, frontend changes don’t clutter the backend team’s channel, and database migrations are flagged for the right specialists.
Ensuring Feedback Reaches the Right People
Timely feedback is important, but it’s just as crucial to get it to the right people. PullNotifier bridges this gap with GitHub-to-Slack user mapping, which automatically mentions the appropriate reviewers in Slack [1].
When a developer requests a review from a specific teammate, PullNotifier tags that person directly in the Slack notification. This targeted approach eliminates the need to monitor general channels, ensuring feedback lands exactly where it’s needed.
Custom channel mapping adds another layer of precision. For instance, notifications about mobile app updates can be sent to the mobile team’s channel, while infrastructure changes are routed to the DevOps channel. This separation keeps teams focused and ensures domain experts are notified of the pull requests that matter most.
"It covers 99.9% of PR workflows while keeping Slack notifications targeted to only those who need it." - Matthew A., Principal Engineer, HumanisingAutonomy [1]
This targeted delivery is especially valuable for larger teams, where not everyone needs to see every pull request. By routing notifications based on repositories, labels, or reviewer assignments, PullNotifier ensures feedback reaches the right people without creating distractions for others. The result? Faster, more focused feedback from the team members best equipped to provide it.
Best Practices for Better Feedback Over Time
Clear feedback in pull requests (PRs) doesn’t just happen overnight - it’s something that evolves as teams consistently reflect and adjust. The best development teams treat feedback as a skill that requires regular attention and deliberate improvement.
Review Your Feedback Practices Regularly
To improve feedback quality, teams need to make it a habit to periodically evaluate how they communicate during PR reviews. This involves setting aside time every few months to assess recent PR conversations and identify patterns.
Start by analyzing recent PR discussions. Are comments clear and actionable, or do they often result in back-and-forth clarifications? Are there recurring issues that create confusion or frustration? Pay attention to reviewers who consistently provide helpful feedback - what makes their approach effective? On the flip side, identify comments or practices that frequently cause misunderstandings.
Metrics can also help pinpoint areas for improvement. For example, track PR review times, the number of review rounds, and the frequency of follow-up questions. These indicators can reveal where adjustments are needed.
Document key takeaways. Keep a record of what works and what doesn’t. If a particular feedback style leads to quicker resolutions, note the techniques or language used. If certain comments consistently cause confusion, identify the wording or structure that might be the issue.
Involve the entire team in this review process. Different perspectives often highlight patterns or issues that individuals might overlook, creating a more complete understanding of how feedback flows within the team.
Run Calibration Sessions
Even experienced developers can have differing views on what makes feedback effective. Regular calibration sessions help align the team on tone, specificity, and expectations, ensuring everyone is on the same page.
Use real examples to guide discussions. Select a recent, anonymized pull request and review it as a group. Identify comments that were clear and led to quick resolutions versus those that caused confusion or prolonged discussions. This exercise helps pinpoint what works and what doesn’t.
Define shared standards for feedback. Agree on how to categorize feedback, such as distinguishing between critical issues that block merging and minor suggestions for improvement. Establish consistent language for different levels of feedback - for instance, phrases like "This needs to be addressed before merging" versus "Consider this for future updates."
Schedule these sessions quarterly or when new team members join. They’re especially useful if feedback-related confusion increases or PR review cycles start taking longer than usual.
Celebrate Better Communication and Code Quality
Recognizing and rewarding clear communication encourages continuous improvement. Publicly acknowledging helpful feedback during team meetings or on platforms like Slack can reinforce positive behaviors and set a standard for others to follow.
Track progress over time. Monitor improvements in feedback quality alongside metrics like faster review cycles, fewer follow-up questions, or increased confidence among developers in implementing feedback. These improvements not only enhance communication but also contribute to better overall productivity and code quality.
Share success stories. Highlight instances where clear feedback helped catch critical issues early or introduced team members to new approaches. These examples demonstrate the tangible benefits of effective communication.
Encourage peer recognition. Allow team members to nominate colleagues who’ve provided especially helpful feedback or shown noticeable improvement in their communication. Peer-to-peer recognition often feels more meaningful than top-down acknowledgment and fosters a culture where clear, thoughtful communication is valued.
The aim isn’t to create competition over who gives the best feedback but to make effective communication a core part of the team’s identity. When clear feedback becomes a shared value, it naturally improves as the team works together to maintain high standards.
Conclusion: The Power of Clear PR Feedback
Clear feedback during pull request (PR) reviews turns what could be a routine task into a chance for growth and collaboration. When done right, it helps developers feel supported and creates an environment where knowledge is shared freely.
As mentioned earlier, effective feedback combines positive reinforcement with specific, actionable suggestions. This approach not only builds trust but also makes the review process smoother and more productive.
Tools like PullNotifier can take this a step further by ensuring feedback reaches the right people at the right time. For instance, real-time Slack notifications encourage quick responses, while customizable routing ensures that critical feedback is directed to the appropriate decision-makers.
The benefits of clear feedback ripple out far beyond individual PRs. Teams that embrace strong communication practices often experience faster review cycles. Developers spend less time clarifying vague comments and more time focusing on meaningful improvements. Over time, this leads to better code quality, as feedback becomes an opportunity to educate and learn rather than just a checklist to complete.
Moreover, clear PR feedback sets the stage for continuous growth. Teams that regularly evaluate their feedback practices, hold calibration sessions, and celebrate good communication foster a culture of learning. This focus on communication doesn't just improve the development process - it boosts team morale, enhances productivity, and raises the overall quality of the software being built.
Investing time in thoughtful, clear feedback isn't just about getting through reviews faster. It's about building stronger teams and creating better outcomes. Every well-crafted comment contributes to a more collaborative and efficient development process.
FAQs
::: faq
How does using empathy and positive language enhance PR feedback?
Using empathy and positive language in pull request (PR) feedback can make a big difference in creating a collaborative and respectful atmosphere. When developers sense that their efforts are appreciated and feedback is delivered constructively, they’re more likely to embrace suggestions without feeling defensive.
This method doesn’t just enhance communication - it also speeds up the process of implementing changes by building mutual respect and understanding. Plus, offering positive feedback plays a key role in keeping team morale high and motivation strong, both of which are critical for maintaining productivity and ensuring thorough, high-quality code reviews. :::
::: faq
How can I clearly differentiate between required changes and optional suggestions in PR feedback?
To ensure your PR feedback is clear and actionable, make a habit of labeling feedback as either required changes or optional suggestions. For example, use phrases like "This must be addressed before merging" to highlight mandatory fixes, and "Consider updating this" or "Optional" for non-critical recommendations. This approach helps developers quickly understand what needs immediate attention and what can be addressed later.
Additionally, tailor the tone and detail of your comments to match the situation. For urgent issues, you could say, "This violates coding standards and needs correction," which emphasizes the importance of the change. For less critical points, a phrase like "You might want to refactor this for readability" conveys flexibility. Clear and thoughtful communication like this fosters better collaboration and speeds up the feedback process. :::
::: faq
How can PullNotifier improve the pull request feedback process?
PullNotifier improves the pull request (PR) feedback process by sending real-time, targeted notifications. These updates ensure your team stays informed about PR progress without being overwhelmed by irrelevant alerts. With this system, reviewers can respond promptly, minimizing delays and keeping the review process moving smoothly.
By simplifying communication, PullNotifier promotes stronger teamwork, speeds up code reviews, and helps your team maintain high levels of productivity. :::