# How to Configure Typo Code Health Checks to Block a PR Merge in Git

#### Configuring Your Git Provider Integration

#### **Enable Status Checks**

To integrate Typo Code Health seamlessly with your Git provider, ensure that the following options are enabled:

* **GitHub:** *Status checks*
* **Bitbucket:** *Pull request status*

Set up **default Git provider integration settings** for new repositories. This ensures all new repositories adopt consistent configurations from the start.

#### **Blocking Merging Pull Requests (Optional)**

Once you're satisfied with Typo Code Health's feedback, you can enforce quality gates to block pull requests that don’t meet the required standards. This is a powerful way to integrate code quality and coverage analysis into your development pipeline while safeguarding against unwelcome changes.

#### **Important Considerations Before Enabling**

To avoid false positives that may block your team's work, ensure the following:

1. Verify that  Typo Code Health is reporting the intended status on pull requests.
2. Review and fine-tune your repository’s **tool settings**, **code pattern configurations**, and **quality gate settings**.

#### **Instructions for Blocking Pull Requests**

Follow your Git provider’s instructions to enforce merge restrictions:

* **GitHub:** [Set Typo Code Health as a required status check.](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/managing-a-branch-protection-rule)
* **Bitbucket:** [Configure Bitbucket to prevent merges with unresolved merge checks.](https://support.atlassian.com/bitbucket-cloud/docs/suggest-or-require-checks-before-a-merge/#Add-branch-permissions-and-merge-checks-to-the-main-branch)

🎉 **You're All Set!**\
Congratulations on successfully integrating and configuring Typo Code Health for your first repository! 🚀


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://typo.gitbook.io/typo-help-docs/faqs/metrics/how-to-configure-typo-code-health-checks-to-block-a-pr-merge-in-git.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
