provides an enhanced mechanism to automate and personalize your review process,
taking it several notches above GitHub’s conventional review assignment. By
harnessing the versatility of pull request rules and conditions, you can define
intricate workflows tailored to your team’s needs. Let’s explore how to utilize
the action for various scenarios.
Below is a list of examples of what you could achieve with pull request rules
Basic AssignmentSection titled Basic Assignment
Automatically request specific users or teams to review a pull request when
it’s labeled with
review. The rule checks for a pull request labeled
and then requests reviews from
Flexible Reviewers AssignmentSection titled Flexible Reviewers Assignment
Dynamic reviewer assignments based on the content and context of pull requests.
File Type Based ReviewSection titled File Type Based Review
Assign a Python expert to review changes in Python files.
Label Based ReviewSection titled Label Based Review
For security-focused pull requests, you might want specialized teams to review.
Random Review AssignmentSection titled Random Review Assignment
Evenly distribute the review workload among team members.
This rule assigns two random users from a list of four to review pull requests
Hierarchical Review SystemSection titled Hierarchical Review System
Define a hierarchy in the review process, with junior team members reviewing first. If changes affect critical components, senior members step in.
Expertise-based Review AssignmentSection titled Expertise-based Review Assignment
Ensure domain experts review relevant changes. If a PR modifies database-related files, request a review from the database expert.
Load Balancing Review AssignmentsSection titled Load Balancing Review Assignments
Distribute reviews more fairly, ensuring certain team members aren’t overwhelmed.
Cross-Team ReviewSection titled Cross-Team Review
Facilitate cross-team collaboration and knowledge sharing. When core components are changed, it’s beneficial to get insights from another team.
On-Demand Review RequestSection titled On-Demand Review Request
Allow authors to trigger specific domain reviews by adding labels.
Mentorship Review ProcessSection titled Mentorship Review Process
Pull requests from new developers are first reviewed by mentors to ensure guidance.
Collaborative Review ProcessSection titled Collaborative Review Process
When critical files are modified, request multiple teams to collaboratively review the changes.
Time-Sensitive ReviewSection titled Time-Sensitive Review
PRs marked as urgent get reviewed by a dedicated quick response team.
With these comprehensive use cases, you’re well-equipped to optimize and
customize your review workflows using Mergify’s
request_reviews action. Adapt
and mix these scenarios to perfectly fit your team’s unique requirements.