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

# GitLab

You can onboard using your own GitLab repository.
If you would like to use your own GitLab repository, please complete the following steps:

<Steps>
  <Step title="Create a GitLab Repository">
    Create a new **GitLab** private repository using one of these options:

    * Create a new repository
    * Clone from the [Honeydew quick-start](https://gitlab.com/honeydew-ai/honeydew-quickstart) example.
  </Step>

  <Step title="Configure allowed IP addresses">
    If you are restricting access to your GitLab group using IP addresses allow list,
    add the IP addresses displayed in the GitLab connection screen in [Honeydew App settings page](https://app.honeydew.cloud/settings)
    to the restricted IP addresses list in your GitLab group settings.

    <Note>
      For the Honeydew Cloud deployment, the following IP addresses are used:

      * `34.86.209.90`
      * `34.145.147.92`

      If you are using a private Honeydew deployment, the IP addresses will be different.
      You can find them in the GitLab connection screen in [Honeydew App settings page](https://app.honeydew.cloud/settings).
    </Note>
  </Step>

  <Step title="Set up Honeydew">
    Please reach out to [support@honeydew.ai](mailto:support@honeydew.ai) and send the full repository name - `org-name/repository-name` (e.g. `honeydew-ai/honeydew-quickstart`).
  </Step>

  <Step title="Create a GitLab Token">
    Create a new **GitLab** token for Honeydew integration:

    * In **GitLab**, under the project you have created for Honeydew, go to **Settings** -> **Access tokens**
    * Create a new project token:
      * Select `Maintainer` as the role
      * Set the following permissions:
        * `api`
        * `read_user`
        * `read_repository`
        * `write_repository`
      * Set a far-enough expiration date
      * Name the token (e.g. `Honeydew`)
  </Step>

  <Step title="Configure the token in Honeydew">
    In the Honeydew application, go to **Settings** -> **GitLab** and configure the token.
  </Step>
</Steps>

<Tip>
  If you have branch rules, push rules or merge request rules for new repositories, you may need to relax these rules for the Honeydew GitLab repository.
  Specifically, please disable Merge request approval rules requiring at least one reviewer for merge requests.
</Tip>

<Note>
  To validate semantic-layer changes in your CI/CD pipeline, see the
  [CI/CD Overview](/docs/governance/ci-cd/overview).
</Note>

## Clean up merged branches

Honeydew creates a Merge Request when you publish changes, but does not delete the branch when
that Merge Request is merged in GitLab. Enable source branch deletion by default so merged
branches do not accumulate in the Honeydew branch list:

1. In your project, go to **Settings** -> **Merge requests**
2. Select **Enable "Delete source branch" option by default**
3. Select **Save changes**

See the GitLab documentation on
[merge requests](https://docs.gitlab.com/user/project/merge_requests/) for the current steps.

<Note>
  This sets the default for new Merge Requests. Whoever merges can still clear the
  **Delete source branch** checkbox, which leaves the branch in place.

  The branch is deleted by the user who merges the Merge Request, so that user needs permission
  to delete the branch — otherwise the merge succeeds but the branch is not deleted.
</Note>

See [Branch cleanup after merge](/docs/governance/git-version-control#branch-cleanup-after-merge)
for how branch deletion affects the Honeydew branch list.
