> For the complete documentation index, see [llms.txt](https://docs.nullify.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.nullify.ai/enterprise-tier/github-self-hosted-app.md).

# Self-Hosted GitHub App

Nullify is currently available as a GitHub App that can be installed across select repositories or all current and future repositories, allowing for organization-wide coverage in one click.

Please reach out to our team to assist with your org setup.

## Install Nullify

### Setting up your GitHub application

See [creating a GitHub App](https://docs.github.com/apps/building-github-apps/creating-a-github-app/) for general guidance on setting up GitHub Apps.

1. Go to `https://github.com/organizations/<insert-your-org-name>/settings/apps/new`
2. **GitHub App Name:** Enter the name of your application.
3. **Homepage URL:** Enter `https://nullify.ai`

<div align="left"><figure><img src="https://3946391995-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FId2OtLCL6O6V3XSRYxtr%2Fuploads%2Fgit-blob-5106578d9d34966009d1a0f3b708c255342345ad%2Fapp-name-field.png?alt=media" alt=""><figcaption><p>GitHub App name</p></figcaption></figure> <figure><img src="https://3946391995-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FId2OtLCL6O6V3XSRYxtr%2Fuploads%2Fgit-blob-961b655b762ae649129f4e9b475a29d2ca93ce61%2Fapp-homepage-url.png?alt=media" alt=""><figcaption><p>Homepage URL</p></figcaption></figure> <figure><img src="https://3946391995-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FId2OtLCL6O6V3XSRYxtr%2Fuploads%2Fgit-blob-86408410b150a0b3973582653e9921f5c62c072a%2Fapp-webhook-url.png?alt=media" alt=""><figcaption><p>Webhook URL</p></figcaption></figure></div>

4. Add the **Callback URL** (provided to you by Nullify)
5. Enable **Request user authorization (OAuth) during installation**

**Webhook:**

6. Add the **Webhook URL**. It is of the form `https://api.<your-organization>.nullify.ai/core/github/webhook`.
7. Add the **Webhook secret** (provided to you by Nullify — you do not generate this yourself)
8. Enable **SSL verification**

**Display Information:**

9. Add the Nullify logo, available from the [brand kit](/more-info/brand-kit.md)

<figure><img src="https://3946391995-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FId2OtLCL6O6V3XSRYxtr%2Fuploads%2Fgit-blob-859d74ac4e3890d00708bf9c599f9f41fbe09b55%2Fapp-logo-setting.png?alt=media" alt=""><figcaption><p>Nullify logo added to GitHub App display information</p></figcaption></figure>

10. Grant access to the following **Repository** **permissions**:

| **Permission**                                   | **Access**   | **Explanation**                                                                     |
| ------------------------------------------------ | ------------ | ----------------------------------------------------------------------------------- |
| Actions                                          | Read-only    | Read required for the autofix workflow to fix failing CI jobs                       |
| Checks                                           | Read & write | Write required to create and modify Check Runs                                      |
| Contents                                         | Read & write | Write required for the autofix engine to read code and commit fixes to fix branches |
| Issues                                           | Read & write | Write required to create and modify Issues                                          |
| <p><strong>GitHub.com:</strong> Metadata<br></p> | Read-only    | This setting is automatically set by GitHub                                         |
| Commit statuses                                  | Read-only    | Required to receive CI build status events from any provider                        |
| Pull Requests                                    | Read & write | Write required to create and modify Pull Requests                                   |

11. Grant access to the following **Organization** **permissions**:

| **Permission** | **Access** | **Explanation** |
| -------------- | ---------- | --------------- |
| Members        | Read       | Read teams      |

12. Subscribe to the following **Events**:

| **Event Type**              | **Subscription** |
| --------------------------- | ---------------- |
| Commit comment              | Required         |
| Pull Request                | Required         |
| Push                        | Required         |
| Check Run                   | Required         |
| Check suite                 | Required         |
| Issues                      | Required         |
| Issue Comment               | Required         |
| Pull Request Review         | Required         |
| Pull Request Review Comment | Required         |
| Pull Request Review Thread  | Required         |
| Repository                  | Required         |
| Status                      | Required         |

13. In the "Where can this GitHub App be installed?" section, select **Only on this account**. Then select **Create GitHub App**.

<figure><img src="https://3946391995-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FId2OtLCL6O6V3XSRYxtr%2Fuploads%2Fgit-blob-27e265f9e9692a980eb5ef3309f8456db5604e23%2Fapp-install-location.png?alt=media" alt=""><figcaption></figcaption></figure>

14. Navigate to the **Developer settings** of your new App. In **General**, get the App ID and Client ID.

<div align="left"><figure><img src="https://3946391995-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FId2OtLCL6O6V3XSRYxtr%2Fuploads%2Fgit-blob-ca2b24ed31d7a5dcf1d3398f7f55ba4897e5124c%2Fapp-developer-settings.png?alt=media" alt=""><figcaption><p>GitHub App - Developer settings</p></figcaption></figure> <figure><img src="https://3946391995-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FId2OtLCL6O6V3XSRYxtr%2Fuploads%2Fgit-blob-52d108fe2dfa6a3310410d389b892a13ef49e697%2Fapp-id.png?alt=media" alt=""><figcaption><p>App ID &#x26; Client ID</p></figcaption></figure></div>

15. In **General**, generate a new Client secret.
16. In **General**, generate a private key:

<figure><img src="https://3946391995-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FId2OtLCL6O6V3XSRYxtr%2Fuploads%2Fgit-blob-362e8069d2283ad1e3cea424b03694f70ae236be%2Fapp-private-key.png?alt=media" alt=""><figcaption><p>Private key</p></figcaption></figure>

17. Send the App ID, Client ID, Client Secret and Private Key to Nullify. This can be done via a password manager.
18. Wait for your stack to be provisioned.
19. In **Install App**, install the App in your organization:

<figure><img src="https://3946391995-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FId2OtLCL6O6V3XSRYxtr%2Fuploads%2Fgit-blob-fa0f35b7a95768e82be72146c56412a8a3a398ba%2Finstall-app-button.png?alt=media" alt=""><figcaption><p>Install App</p></figcaption></figure>

20. In **Repository access**, select the repositories you would like to install Nullify:

<figure><img src="https://3946391995-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FId2OtLCL6O6V3XSRYxtr%2Fuploads%2Fgit-blob-d67af7aff31efcca27f80fc15c39b518747dab9f%2Frepo-access.png?alt=media" alt=""><figcaption><p>Repository access</p></figcaption></figure>
