> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getblame.com/llms.txt
> Use this file to discover all available pages before exploring further.

# GitHub Status Checks

Blame turns AI code reviews into automated **CI/CD Quality Gates**. By posting native **GitHub Check Runs** directly to your commits, Blame can prevent unstable, untested, or vulnerable pull requests from being merged into protected branches (e.g., `main` or `production`).

<Frame>
  <img src="https://mintcdn.com/blame-085dcc89/6KdHDfo-JlmjqOJ_/images/Group-4-2.png?fit=max&auto=format&n=6KdHDfo-JlmjqOJ_&q=85&s=46e29b5058530a9dfa7e2054d4818c88" alt="Group 4 2" width="2400" height="1260" data-path="images/Group-4-2.png" />
</Frame>

***

## How Status Checks Work

When a pull request is opened or updated, Blame creates an `in_progress` GitHub Check Run. Once analysis finishes, Blame evaluates the results against your team's quality criteria and updates the check run conclusion to `success` or `failure`.

```mermaid theme={null}
flowchart TD

    PR[Developer Pushes Commits] --> CheckCreated[Create GitHub Check Run: in_progress]

    CheckCreated --> ReviewWorker[Run Blame Review Pipeline]

    subgraph Evaluation
        ReviewWorker --> EvalScore{Confidence Score >= Required Threshold?}
        ReviewWorker --> EvalCritical{Critical / High Issues Found?}
    end

    EvalScore -- No --> FailCheck[Check Run: FAILURE]
    EvalCritical -- Yes --> FailCheck

    EvalScore -- Yes & No Criticals --> PassCheck[Check Run: SUCCESS]

    FailCheck --> BranchRule[GitHub Branch Protection Blocks Merge]
    PassCheck --> ReadyMerge[Ready to Merge]
```

***

## Configuring Status Checks in Blame

Status check behavior can be configured per repository or organization-wide in **Settings > Code Review**.

### 1. Enable Status Checks (`use_status_checks`)

* **Enabled (Default)**: Automatically creates and manages GitHub Check Runs for every review run.
* **Disabled**: Reviews are posted purely as conversational PR comments without creating check runs.

### 2. Required Confidence Threshold (`required_confidence`)

Set the baseline confidence score (from `1/5` to `5/5`) required for the status check to pass:

| **Threshold** | **Strictness** | **Behavior** |
| :- | :- | :- |
| `3 / 5` *(Default)* | Standard | Passes if code is solid and has no fatal flaws, even if minor non-blocking suggestions exist. |
| `4 / 5` | High | Requires comprehensive edge-case handling and clean architectural patterns. |
| `5 / 5` | Strict | Requires production-ready code with complete test coverage, defensive guards, and zero warnings. |

### 3. Post Status Comments (`post_status_comments`)

* **Enabled (Default)**: In addition to the check run, posts the executive review summary comment directly to the PR conversation thread.
* **Disabled**: Limits feedback to inline diff comments and check run metadata only.

***

## Pass vs. Failure Criteria

A check run is marked as `failure` if **either** of the following conditions is met:

1. **Critical or High Severity Defects**: Blame identified one or more `critical` or `high` severity bugs, such as broken imports, runtime exceptions, security holes, or unhandled promise crashes.
2. **Below Confidence Threshold**: The calibrated confidence score falls below your configured `required_confidence` threshold.

### Check Output Examples

#### Successful Check Run

```text theme={null}
Title: Code Review Passed (4/5)

Summary: Blame code review completed verification with confidence rating 4/5 (required: 3/5). Zero critical errors found.

Conclusion: SUCCESS
```

#### Failed Check Run

```text theme={null}
Title: Blame Review Failed: 1 Critical, 2 High Issues

Summary: Blame identified 1 critical issue(s), 2 high severity issue(s), and 3 warning(s). Review confidence: 2/5 (required: 3/5).

Conclusion: FAILURE
```

***

## Enforcing Checks in GitHub Branch Protection

To block pull requests from merging until Blame review passes:

1. In your GitHub repository, navigate to **Settings > Branches**.
2. Click **Add branch protection rule** (or edit your existing rule for `main`).
3. Check **Require status checks to pass before merging**.
4. In the search box, search for `Blame` or `Blame CI` and check the box.
5. *(Optional)* Enable **Require branches to be up to date before merging**.
6. Click **Save changes**.

***

## Re-evaluating Failed Status Checks

If a pull request fails the quality gate:

1. **Apply Suggested Fixes**: Reviewers or authors can click **Apply suggestion** on inline comments or address issues in their IDE.
2. **Push New Commits**: Pushing new commits automatically triggers an incremental review run.
3. **Trigger via Slash Command**: Comment `/blame review` or `/review` in the PR discussion to force an immediate re-evaluation.
4. **Check Resolution**: If all critical bugs are resolved and the score meets the threshold, the check run automatically flips to `success`, unlocking the merge button.

***

## Automated Tracking in Linear & Discord

When a check run fails with high or critical severity defects:

* **Linear**: If Linear integration is connected, Blame automatically logs a tracked issue with the diff coordinates and suggested fix.
* **Slack / Discord**: Alert channels receive instant notification cards with confidence metrics and direct links to the failing pull request.

***

## Related Documentation

* [**Review Architecture & Anatomy**](/review-architecture) — How confidence scores and findings are calculated.
* [**Configuring Review Strictness & Customization**](/review-strictness-and-customization) — Fine-tuning review depth and comment visibility.
* **Auto-Approve Low-Risk Pull Requests** — Automating low-risk PR merges.
