> For the complete documentation index, see [llms.txt](https://docs.baz.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.baz.co/capabilities/merge-automation.md).

# Merge Automation

### How to Configure

Review Automation requires GitHub write access. Once granted, proceed to **Baz → Settings → Configurations → Review Automation**.

Choose which capability you would like to configure:

* **Auto Approve Pull Requests**
* **Auto Resolve Review Threads**

<figure><img src="/files/gjbJ7qQZ1Y9eRRDBqpgT" alt=""><figcaption><p>Review Automation Configuration</p></figcaption></figure>

### Auto Approve Pull Requests

When enabled, Baz will automatically approve a PR only if all configured conditions are met.\
If any condition is not satisfied, no approval is added.

#### Available Conditions

You can combine the following conditions:

* Repository
* Authors
* Excluded file paths
* Maximum lines changed
* Maximum files changed

#### Example

* Repo: `frontend-app`
* Max lines changed: 200
* Exclude path: `/migrations/`
* Author: specific team members

Baz will approve only PRs that match all of the above.

### Auto Resolve Review Threads

When enabled, Baz may automatically resolve PR comment threads under strict conditions.\
This helps reduce manual cleanup of addressed comments.

#### Default Condition

Baz will only resolve a thread **if a later commit has already addressed the comment**.\
This condition is always enforced and does not require configuration.

#### Available Conditions

* Repository
* Comment author


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.baz.co/capabilities/merge-automation.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
