Quality Gate
Why is my Pull Request blocked with an error saying 'Quality gate failed'?
Why is my Pull Request blocked with an error saying 'Quality gate failed'?
All 45 tests pass, but 68% coverage is below the agreed 80%, so the required check still fails.
Agree on criteria, then enforce them: Set criteria according to project risk, such as passing critical tests and no severe security findings. CI runs checks; require the gate result in branch protection to block changes that fail.
Use the failure report to choose a fix: For low coverage, inspect untested paths; for failing tests, compare actual and expected results. Rerunning unchanged code or lowering the threshold does not prove that the original problem was fixed.
This PR failed its quality gate. Inspect the report, fix the missing tests or code issue, rerun the checks, and verify that the original gate criteria are satisfied.