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

# Configuring GitHub prebuilds

<Warning>**Defunct:** Filtering and enabling prebuilds via the `.gitpod.yml` file is no longer supported. Please see [Configuring prebuilds](/docs/classic/user/configure/repositories/prebuilds#configuring-prebuilds) instead. You can find the original documentation below.</Warning>

The `github` namespace in the `.gitpod.yml` file defines when prebuilds should be executed. By default, prebuilds are run on push to the default branch and for each pull request coming from the same repository.

```yml .gitpod.yml theme={null}
github:
    prebuilds:
        # enable for the default branch (defaults to true)
        master: true
        # enable for all branches in this repo (defaults to false)
        branches: false
        # enable for pull requests coming from this repo (defaults to true)
        pullRequests: true
        # enable for pull requests coming from forks (defaults to false)
        pullRequestsFromForks: false
        # add a check to pull requests (defaults to true)
        addCheck: true
        # add a "Review in Gitpod" button as a comment to pull requests (defaults to false)
        addComment: false
        # add a "Review in Gitpod" button to the pull request's description (defaults to false)
        addBadge: false
```

#### Additional GitHub integration

Once the GitHub app is installed, Gitpod can add helpful annotations to your pull requests.

#### Checks

By default, Gitpod registers itself as a check to pull requests - much like a continuous integration system would do.

The default behavior, however, would not make the checks fail when the prebuild failed.
This can be enabled with the following snippet:

```yml theme={null}
github:
    prebuilds:
        addCheck: prevent-merge-on-error
```

You can disable this behaviour in the `.gitpod.yml` file in your default branch:

```yml theme={null}
github:
    prebuilds:
        addCheck: false
```

#### Comment

Gitpod can add a comment with an "Open in Gitpod" button to your pull requests.

You can enable this behaviour in the `.gitpod.yml` file in your default branch:

```yml theme={null}
github:
    prebuilds:
        addComment: true
```

#### Badge

Instead of adding a comment, Gitpod can also modify the description of a pull request to add the "Open in Gitpod" button.
This approach produces fewer GitHub notifications, but can also create a concurrent editing conflict when the bot and a user try to edit the description of a pull request at the same time.

You can enable this behaviour in the `.gitpod.yml` file in your default branch:

```yml theme={null}
github:
    prebuilds:
        addBadge: true
```

The `addComment` and `addBadge` behaviours are not mutually exclusive (i.e. enabling one does not disable the other).
If you don't want the comments to be added, disable them using `addComment: false`.
