Ensure previous approvals are dismissed when updates are introduced to a code

Require that all pull requests receive a specific number of approving reviews before someone merges the pull request into a protected branch.

Risk Level: medium
Platform: Github
Spectral Rule ID: GH-HRD023

REMEDIATION

SaaS:

  1. On GitHub.com, navigate to the main page of the repository.
  2. Under your repository name, click Settings.
  3. In the Code and automation section of the sidebar, click Branches.
  4. Next to "Branch protection rules", click Add rule.
  5. Choose or create a Branch protection rule.
  6. Under "Protect matching branches", select Require a pull request before merging
  7. To require approvals before a pull request can be merged, select Require approvals, click the Required number of approvals before merging drop-down menu, then select the number of approving reviews you would like to require on the branch.

Read more: