Stop coverage drops before merge: GitHub adds code coverage rulesets
GitHub now lets Code Quality users block pull requests when test coverage falls below configured thresholds, giving teams an enforceable merge-time coverage gate.
GitHub has confirmed a public preview that lets teams block pull requests when code coverage drops below configured thresholds. Confidence level: confirmed. The feature is available for GitHub Code Quality users on github.com, with GitHub Enterprise Cloud and Team support, but not GitHub Enterprise Server.

What changed
GitHub now lets teams use branch rulesets to prevent merges when pull request coverage misses a minimum percentage, drops too far from the default branch, or violates both controls. Teams can begin in evaluate mode, inspect the impact, and then move to active enforcement.
The update was announced on June 30, 2026. GitHub says the feature is in public preview for GitHub Code Quality users on github.com. Code Quality is available for GitHub Enterprise Cloud and Team and remains unavailable on GitHub Enterprise Server.
| Control | What it checks | Best use | Caveat |
|---|---|---|---|
| Minimum coverage | Overall coverage floor | Prevent low-tested changes from landing | Needs reliable coverage upload |
| Maximum coverage drop | Regression from default branch | Stop accidental test erosion | Choose a threshold that fits repo volatility |
| Evaluate mode | Impact without blocking | Trial rollout across teams | Does not enforce until switched active |
| Active mode | Blocks failing pull requests | Production branch protection | Can block merges if CI is misconfigured |
Why this is early
The primary source is GitHub's own changelog. GitHub Docs also confirms the setup path for uploading coverage reports and explains Code Quality threshold rules for pull requests.
It is still early because the feature is in public preview. GitHub says Code Quality will become generally available on July 20, 2026, and preview billing conditions can change after that date.
Key takeaways
- Coverage can now be enforced through branch rulesets instead of reviewed manually.
- Teams can set a minimum percentage, an allowed drop from the default branch, or both.
- Evaluate mode gives maintainers a low-risk rollout path.
- Coverage reports must be generated and uploaded correctly before enforcement.
- The feature targets GitHub Code Quality users on github.com, not GitHub Enterprise Server.
Availability and access
GitHub says the feature is in public preview for all GitHub Code Quality users on github.com. It applies to GitHub Enterprise Cloud and Team customers using Code Quality. GitHub Docs says code coverage setup requires Code Quality to be enabled, GitHub Actions test coverage output, and a Cobertura XML coverage report.
During public preview, Code Quality is not billed, though scans can consume GitHub Actions minutes. GitHub Docs says usage will incur charges after Code Quality becomes generally available on July 20, 2026.
Practical LinkLoot angle
This is useful for teams that already collect coverage but still rely on humans to notice regressions. A ruleset makes the policy explicit: a pull request either meets the agreed threshold or it does not merge.
Start with evaluate mode on one active repository. Watch false positives, flaky test jobs, and language-specific coverage gaps. Once the signal is stable, move the rule to active enforcement for default branches. For adjacent automation workflows, use LinkLoot's /guides/ai-workflow-automation hub to map where CI checks, AI review, and release gates belong.
What to verify before you act
- Confirm GitHub Code Quality is enabled for the repository or organization.
- Check that your CI generates Cobertura XML coverage reports.
- Verify coverage uploads appear on pull requests before enabling enforcement.
- Start with evaluate mode to avoid blocking every merge on a setup mistake.
- Review billing and plan eligibility before rolling the feature out broadly after July 20, 2026.
Source check
Confirmed by: GitHub's changelog confirms the new branch ruleset coverage gate, preview status, supported GitHub plans, and Enterprise Server limitation.
Implementation context: GitHub Docs confirms the setup requirements for coverage reports and the threshold-based pull request ruleset flow. These docs are the place to verify exact UI steps before changing repository protections.
Yes. GitHub Code Quality users can configure branch rulesets to block merges when coverage misses configured thresholds.
