github GitHub Changelog ·

GitHub code coverage merge protection in public preview

infrapreviewengineer
feature announcement

GitHub has introduced code coverage merge protection for pull requests, allowing teams to block merges if test coverage falls below defined thresholds. This feature acts as a quality gate to prevent regressions and maintain testing standards, now available in public preview for GitHub Code Quality users on GitHub Enterprise Cloud and Team. Users can start in evaluate mode to assess impact before enforcing merge protection.

  • Code coverage merge protection for pull requests
  • Evaluate mode for gradual rollout
  • Public preview and availability
Features (2)
  • Code coverage merge protection for pull requests

    GitHub now supports using branch rulesets to prevent pull requests from merging if test coverage drops below specified thresholds. This feature includes options for setting a minimum coverage percentage or a maximum allowed drop compared to the default branch.

  • Evaluate mode for gradual rollout

    The new merge protection feature can be initiated in 'evaluate mode' to assess its potential impact before full enforcement. This allows teams to understand the consequences before switching to 'active mode' to enforce merge protection.

Notes (1)
  • Public preview and availability

    This code coverage merge protection is now in public preview for all GitHub Code Quality users on github.com. GitHub Code Quality is available for GitHub Enterprise Cloud and Team, with a preview period offering free access.

Read the original announcement →

https://github.blog/changelog/2026-06-30-github-code-coverage-merge-protection-for-pull-requests