# Connect a git repository

The GitHub App can validate pull requests and import merged ontology files automatically. On GitLab, Bitbucket, or another provider, your pipeline runs the equivalent CLI commands.

Before connecting, [add the ontology files](/build/bootstrap/) to the repository. The configured path, `cassis/` by default, represents the complete ontology.

## GitHub

1.  In Cassis, open **Settings → GitHub → Connect GitHub**.
2.  Install the Cassis App for the repositories it should access.
3.  Select the project and repository, confirm the ontology path, and save.
4.  Open a test pull request that changes an ontology file. Cassis should post an **ontology validation** check. After merge, the new Cassis version should record the commit.

If the merged ontology is identical to the published one, the import is a no-op and creates no version.

- **On a pull request** The App validates the complete ontology at that commit.

- **On the default branch** The App imports the merged tree and publishes a new version.

- **In your CI** Add the eval suite; the App does not run it for you.

## Any other git provider

There is no repository connection to configure in Cassis. Store `CASSIS_API_KEY` in your CI secrets, then add two jobs:

-   On a pull or merge request, run `cassis ontology check` and `cassis eval run`.
-   On the default branch, run `cassis ontology upload` to publish the merged tree.

The [CI guide](/build/ci/) has copy-paste examples for GitHub Actions and GitLab CI.

Use either the GitHub App or a default-branch upload job for a project, not both. They are two ways to publish the same complete ontology.
