# 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**
5. Enable **Request user authorization (OAuth) during installation**
6. Enable **Device Flow**

**Webhook:**

7. Add the **Webhook URL**
8. Add the **Webhook secret**
9. Enable **SSL verification**

**Display Information:**

10. Add the Nullify logo (amethyst only) available from <https://docs.nullify.ai/more-info/brand-kit>

<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>

11. 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 creating and resolving comments            |
| 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                   |
| Pull Requests                                    | Read & write | Write required to create and modify Pull Requests             |

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

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

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

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

14. 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>

15. 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>

16. In **General**, generate a new Client secret.
17. 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>

18. Send the App ID, Client ID, Client Secret and Private Key to Nullify. This can be done via a password manager.
19. Wait for your stack to be provisioned.
20. 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>

21. 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>
