{"meta":{"title":"Resolving a block on your pull request","intro":"Identify and resolve a code quality or coverage threshold block on your pull request so you can merge your changes.","product":"Security and code quality","breadcrumbs":[{"href":"/en/code-security","title":"Security and code quality"},{"href":"/en/code-security/how-tos","title":"How-tos"},{"href":"/en/code-security/how-tos/maintain-quality-code","title":"Maintain quality code"},{"href":"/en/code-security/how-tos/maintain-quality-code/unblock-your-pr","title":"Unblock your PR"}],"documentType":"article"},"body":"# Resolving a block on your pull request\n\nIdentify and resolve a code quality or coverage threshold block on your pull request so you can merge your changes.\n\n## Understanding why your pull request is blocked\n\nRepository administrators and organization owners can set quality gates using GitHub Code Quality. When you open a pull request, checks automatically run to evaluate your changes against these standards.\n\nThere are two types of blocks:\n\n* **Code quality findings**: your changes introduce issues that fall below the required quality threshold.\n* **Coverage threshold**: your changes cause code coverage to fall below a required minimum, or cause code coverage to drop by more than a permitted amount relative to the default branch.\n\nThese checks help maintain a healthy, maintainable codebase and prevent technical debt from accumulating.\n\n## Resolving a code quality findings block\n\nIf your pull request introduces code that falls below the required quality threshold, you'll see a merge block banner at the bottom of the pull request in the \"Checks\" section: \"Merging is blocked: Code quality findings were detected.\"\n\n![Screenshot of the merge block banner in the Checks section of a pull request.](/assets/images/help/code-quality/code-quality-merge-block.png)\n\nThe quality gate set by your repository administrator or organization owner defines the **minimum severity level** that will block merging. All findings at that severity level or higher must be fixed or dismissed before you can merge. If the merge block banner does not specify a severity level, your repository requires **all findings** to be addressed.\n\nTo unblock your pull request, you need to fix or dismiss the findings that meet or exceed the blocking severity:\n\n1. Review the comments left by the `github-code-quality[bot]` on your pull request. Each comment is labeled by severity (**Error**, **Warning**, **Note**).\n2. Fix or dismiss the relevant findings. For detailed instructions, see [Fixing code quality findings on a pull request](/en/code-security/how-tos/maintain-quality-code/fix-findings-on-a-pr).\n3. Verify the merge block banner is no longer present in the \"Checks\" section of your pull request.\n\n## Resolving a coverage threshold block\n\nIf your pull request is blocked by a coverage threshold rule, you'll see a merge block banner in the \"Checks\" section with a message describing which threshold was not met. For example:\n\n* \"Line coverage 22.0% is below minimum 50.0%\": the line coverage on your pull request branch is below the minimum line coverage percentage configured in the ruleset.\n* \"Line coverage decreased by 2.5%, maximum allowed drop is 1.0%\": your changes caused line coverage to drop by more than the permitted amount relative to the default branch.\n\nTo unblock your pull request, you need to add or modify tests so that more lines of the codebase are executed:\n\n1. Review the coverage summary comment on your pull request to identify which files or areas lack coverage.\n2. Add or update tests to increase line coverage. Copilot can help you write and update your tests. See [Testing code](/en/copilot/tutorials/copilot-cookbook/testing-code).\n3. Push your changes. The coverage check will re-run automatically.\n\n## Next steps\n\n* [Fixing code quality findings in your repository backlog](/en/code-security/how-tos/maintain-quality-code/fix-backlog-findings)"}