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

# Bitbucket

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

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

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

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

    <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 Bitbucket 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 Bitbucket Token">
    Create a new **Bitbucket** repository token for Honeydew integration:

    * In **Bitbucket**, under the repository you have created for Honeydew, go to **Repository settings** -> **Access tokens**
    * Create a new Repository access token. Set the `Write` permission under `Pull requests`:
          <img src="https://mintcdn.com/honeydew/YIHua7Tb-EdKa7vx/images/Bitbucket-Repository-Access-Token.png?fit=max&auto=format&n=YIHua7Tb-EdKa7vx&q=85&s=752321b180933dd40f865a223120809b" alt="New Repository access token" width="1194" height="1258" data-path="images/Bitbucket-Repository-Access-Token.png" />
  </Step>

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

<Tip>
  If you have branch restrictions for new repositories, you may need to relax these rules for the Honeydew Bitbucket repository.
  Specifically, please disable Merge checks requiring minimal number of approvals.
</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 Pull Request when you publish changes, but does not delete the branch when
that Pull Request is merged in Bitbucket. Set source branch deletion as the default so merged
branches do not accumulate in the Honeydew branch list:

1. In your repository, go to **Repository settings** -> **Branching model** (under **Workflow**)
2. Set **Delete source branch by default** to **On**

The same setting can be applied to all repositories in a project from the project's
**Branching model** settings. See the Bitbucket documentation on
[configuring a project's branching model](https://support.atlassian.com/bitbucket-cloud/docs/configure-a-projects-branching-model/)
for the current steps.

<Note>
  This sets the default for the merge dialog. Whoever merges can still clear the option,
  which leaves the branch in place.
</Note>

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