Bitbucket

Learn more on how to setup Qodo Merge on Bitbucket.

Before you start

Integrating Qodo Merge with Bitbucket is a simple process that can be applied to one repository or scaled to multiple workspaces.

Setup usually takes a few minutes, including authentication and pipeline configuration.

Once connected, Qodo Merge will process your pull requests automatically and provide reviews, summaries, or improvement suggestions as part of your Bitbucket workflow.


1. Log In to Qodo Portal

Before setting up Qodo Merge, make sure to create a Qodo account and sign in.

Once you've signed in to the Qodo Portal, you can follow the Qodo Merge installation guide straight from the portal, or continue reading here.

2. Setup Qodo Merge

Once you've signed in to your Qodo account, follow the instructions in the Qodo Portal or below to setup Qodo Merge on Bitbucket.

Bitbucket App

  1. Go to Go to the Qodo Merge Pro app page.

  2. Choose which workspace Qodo Merge should have access to, then click Grant access.

Bitbucket Server

Bitbucket Pipeline

  1. Create a pipelines file: Create a new file named bitbucket-pipelines.yml with the content below:

pipelines:
    pull-requests:
      '**':
        - step:
            name: PR Agent Review
            image: codiumai/pr-agent:latest
            script:
              - pr-agent --pr_url=https://bitbucket.org/$BITBUCKET_WORKSPACE/$BITBUCKET_REPO_SLUG/pull-requests/$BITBUCKET_PR_ID review
  1. Choose your authentication type: You could choose either basic or bearer.

    • bearer = just a token (more secure, no username/password exposure).

    • basic = username + password (or app password) combined and encoded.

  2. Create a token: Based on your authentication type, create a token.

    • If your authentication type is bearer, generate an access token for your Bitbucket repository:

      1. Go to your repository's settings.

      2. Choose Secutiry then Access Tokens.

      3. Generate an access token and save it somewhere safe.

    • If your authentication type is basic, generate a base64 encoded token from your username:password combination and save it somewhere safe.

  3. Add secure variables: Go to your repository's settings. Choose Pipelines. Under Repository variables, add the following variables:

    • OPENAI_API_KEY: <your key>

    • BITBUCKET.AUTH_TYPE: basic or bearer (default is bearer)

    • BITBUCKET__BEARER_TOKEN or BITBUCKET.BASIC_TOKEN: <your token> (obtained from step 3)

You’re all set! Start using Qodo Merge.

Visit our usage guide for next steps.

Last updated

Was this helpful?