How to Address Pull Request Merged w/o Review or with Basic Review

How to Address Pull Request Merged w/o Review or with Basic Review

Why Is It a Problem?

Even the best developers can make mistakes or miss things. After coding for a period of time and self-testing, coders can become partially "blind" to issues in their own code. In the review process, putting a fresh set of eyes on code can often reveal issues that were accidentally missed or forgotten by the code owner. Frequently, a thorough review process will lead to identifying and correcting critical quality fixes before they are deployed to your code-base.

This is why skipping this process for pull requests that contain an "untrivial" number of changes increases significantly the chances of missing problems and potential bugs and in general adding quality risk to the codebase.

How to identify PRs merged without review

Within the LinearB application, go to Activity -> Pull Requests -> click the Filter menu -> select "Merged w/o Review"

This list can be filtered by all teams, or by PRs submitted by specific teams.

The "PRs merged w/o review" metrics is also available in your Quality Metrics Report visible in your Metrics tab. You can also build custom metrics report tracking code merged without review by a specific team, or specific repo. Learn more about building custom metrics reports here.

Be alerted if a PR is merged without review!

Utilizing LinearB's Goals to alert your team if a PR is merged without review. Team alerts can be set to alert a team for a variety of quality or bottleneck issues using LinearB's WorkerB app. Learn more about connecting your team to WorkerB below:

Connecting WorkerB to Slack

Connecting WorkerB to Teams

Team goal alerts can be sent to the Slack or MS Teams channel of your choice. These goal alerts can be customized to monitor for any PR merged without review, or also to listen for PRs above a certain number of code changes to be merged without review.

The alert will notify the team of the number of code changes merged without review, the number of codes changes that can be merged unreviewed without breaching a team goal, and a link directly to the PR which triggered the alert.

  1. To enable a team Goal and WorkerB alert around unreviewed code merges, follow these steps:
  2. Select the team in LinearB for which you would like to set a goal.
  3. Click on the gear icon, and select team settings, then click on the Goals tab in your team settings page.
  4. Find the "Merge only reviewed requests" goal, click Edit to the right of this goal to set the acceptable threshold of code changes before a review is required.
  5. Click on the icon in order to enable Slack/MS Teams alerts for this goal.

Ways to remediate PRs merged without review

In order to reduce the quality risk that is introduced by pull requests merged without review you can do one of the following actions:

Revert the Pull Request

Git provides a method to revert pull requests and get the base branch back to the state before the merge was done. This will remove the code changes from the base branch, and leave the pending branch still available. This will allow your team to open a new pull request and conduct a proper review process before this code is merged again.

Retroactively Review Changes

Even though this code was merged, It is possible to review the changes made in this branch. If there are issues that were found and need to be fixed, open a new branch for all modifications and fixes that are required from the retroactive review.

Educate your team about the risks of this practice

When you come across one of these practices it is important to discuss this with your team member and explain the risks.


How did we do?


Powered by HelpDocs (opens in a new tab)