# Configure with GitHub

After successfully authenticating, you will be redirected into your private Baz workspace. Select `Connect to GitHub` to select which organization and repositories you would like to integrate with Baz.&#x20;

*Note: If your GitHub admin already integrated your organization, you will be able to select it from the organization navigation menu.*

<figure><img src="https://3328658395-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVjqbueGEV6lEh1M5NENO%2Fuploads%2F0HrzGyFlYZUHdpuunwJ2%2FScreenshot%202024-12-11%20at%2013.06.14.png?alt=media&#x26;token=3d7a1f55-dc5e-48c1-a6e1-d47f417c6ea4" alt=""><figcaption><p>Connect to GitHub</p></figcaption></figure>

## **Install Baz Review GitHub App**

You will be redirected to the GitHub app installation page. Select the organization or user account where you want to install the Baz GitHub app. Choose the repositories that Baz should access and click the **Install** button to complete the installation.

<figure><img src="https://3328658395-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVjqbueGEV6lEh1M5NENO%2Fuploads%2F4B9bRaRIOET4831o18GG%2FScreenshot%202024-09-08%20at%2012.26.01.png?alt=media&#x26;token=5da1deab-c1ce-4fae-9045-202cc2d34c28" alt="" width="375"><figcaption></figcaption></figure>

That's it. You've succusfuly installed Baz. You will now be redirected back to Baz to see your Code and open Changes.&#x20;

## Write Access GitHub App

Baz allows an elevated permission set, including write access to repo contents and interacting with PRs via Baz UI and Baz CLI. For that we need to install the **Baz-app** GitHub app. For more details - skip to the [Permission Model](#permission-model) section below

You may start this flow from the configurations page, or by [visiting this link](https://github.com/apps/baz-app/installations/select_target). It will install the Baz-app GitHub app which includes write access to the relevant repos you select. It will look like this (notice the different scope of the app versus baz-review app):

<figure><img src="https://3328658395-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVjqbueGEV6lEh1M5NENO%2Fuploads%2FR2C5imnHur81PoE3nNzF%2Fimage.png?alt=media&#x26;token=544636d3-5fea-4a29-8834-e03a6c70ec23" alt="" width="563"><figcaption></figcaption></figure>

This app allows the functionality of:

1. Baz Fixer
2. Auto-resolving addressed comments
3. Approving PRs with write access
4. User interactions via baz UI. This will require a second set of per-user installations as can be seen here:<br>

   <figure><img src="https://3328658395-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVjqbueGEV6lEh1M5NENO%2Fuploads%2Fl8R3z30Jqqn2pCtqfDTy%2Fimage.png?alt=media&#x26;token=ea4069a9-8406-4dfb-92ec-26c81210e3b4" alt="Personal installation of Baz-app" width="401"><figcaption></figcaption></figure>

## Permission Model

Baz supports a two-level permission model.

### Baz Reviewer

The Baz Reviewer app requires only the permissions necessary to review pull requests:

* Read access to repository code
* Write access to PR comments
* Permission to create GitHub checks

This allows Baz to review PRs and provide feedback without modifying repository code.

### Baz-app

Some workflows require write access to repository code, such as:

* Auto-approve PRs
* Auto-resolve findings
* Automated code fixes

For teams that want these capabilities, Baz provides a separate app with elevated permissions.

## Reconfiguring

At any point, you can go back and reconfigure GitHub by going to your Integrations Page. Click the `Configure` button to connect Baz to configure the baz-reviewer app, and click the `Configure write access` for that specific account to configure the baz-app app. Both of these links will redirect you to GitHub’s authorization page for the relevant app. If you aren’t logged in, log in to your GitHub account. Once logged in, you will see a permission request page where Baz requests access to your account. Review the permissions and click the **Authorize Baz** button to grant access.

## FAQ

<details>

<summary><strong>How do I connect Baz to my GitHub repositories?</strong></summary>

You will authorize Baz via GitHub’s OAuth or an app integration, selecting which repos Baz may access. Once connected, Baz will monitor pull requests in those repos.

</details>

<details>

<summary><strong>Can I restrict Baz to only certain folders or repos?</strong></summary>

Yes. You can scope Baz’s reviews to specific repositories or folders so it doesn’t run everywhere by default.

</details>

<details>

<summary><strong>How is Baz triggered on pull request events?</strong></summary>

Baz listens to PR events (open, updates, commits pushed) and can be configured to re-review on new pushes, dismissals, or resolution of comments.

</details>
